' . __( 'This article in a nutshell:', 'd12-message-blocks' ) . '

' . $content . '
'; return $filestring; } add_shortcode( 'd12-nutshell' , 'd12_nutshell' ); /* Update */ function d12_update( $atts, $content= NULL) { $filestring = '

' . __( 'Update Information:', 'd12-message-blocks' ) . '

' . $content . '
'; return $filestring; } add_shortcode( 'd12-update' , 'd12_update' ); /* Attach */ function d12_attach( $atts, $content= NULL) { $filestring = '

' . __( 'Downloads:', 'd12-message-blocks' ) . '

' . $content . '
'; return $filestring; } add_shortcode( 'd12-attach' , 'd12_attach' ); /* Delete */ function d12_delete( $atts, $content= NULL) { $filestring = '

' . __( 'This page has been marked for deletion.', 'd12-message-blocks' ) . '

' . $content . '
'; return $filestring; } add_shortcode( 'd12-delete' , 'd12_delete' ); /* Part of a Series */ function d12_part( $atts, $content= NULL) { extract( shortcode_atts( array( 'series' => '', ), $atts ) ); echo '

'; printf(__( 'This page is part of a series on %s', 'd12-message-blocks' ), $series ); echo '.

' . $content . '
'; } add_shortcode( 'd12-part' , 'd12_part' ); /* Mentions */ function d12_mentions( $atts, $content= NULL) { $filestring = '

' . __( 'This page has been mentioned here:', 'd12-message-blocks' ) . '

' . $content . '
'; return $filestring; } add_shortcode( 'd12-mentions' , 'd12_mentions' ); /* Warning */ function d12_warning( $atts, $content= NULL) { $filestring = '

' . __ ( 'Warning!', 'd12-message-blocks' ) . '

' . $content . '
'; return $filestring; } add_shortcode( 'd12-warning' , 'd12_warning' ); /* Important */ function d12_important( $atts, $content= NULL) { $filestring = '

' . __ ( 'Important!', 'd12-message-blocks' ) . '

' . $content . '
'; return $filestring; } add_shortcode( 'd12-important' , 'd12_important' ); /* Notice */ function d12_notice( $atts, $content= NULL) { $filestring = '

' . __( 'Notice!', 'd12-message-blocks' ) . '

' . $content . '
'; return $filestring; } add_shortcode( 'd12-notice' , 'd12_notice' ); /* Error */ function d12_error( $atts, $content= NULL) { $filestring = '

' . __( 'Error!', 'd12-message-blocks' ) . '

' . $content . '
'; return $filestring; } add_shortcode( 'd12-error' , 'd12_error' ); /* Caution */ function d12_caution( $atts, $content= NULL) { $filestring = '

' . __( 'Caution!', 'd12-message-blocks' ) . '

' . $content . '
'; return $filestring; } add_shortcode( 'd12-caution' , 'd12_caution' ); /* Archive */ function d12_archive( $atts, $content= NULL) { $filestring = '

' . __( 'This page has been archived.', 'd12-message-blocks' ) . '

' . $content . '
'; return $filestring; } add_shortcode( 'd12-archive' , 'd12_archive' ); /* Support */ function d12_support( $atts, $content= NULL) { extract( shortcode_atts( array( 'title' => '', ), $atts ) ); return '

' . $title . '

' . $content . '
'; } add_shortcode( 'd12-support' , 'd12_support' ); /* Contact */ function d12_contact( $atts, $content= NULL) { extract( shortcode_atts( array( 'title' => '', ), $atts ) ); return '

' . $title . '

' . $content . '
'; } add_shortcode( 'd12-contact' , 'd12_contact' ); /* Global */ function d12_global( $atts, $content= NULL) { extract( shortcode_atts( array( 'title' => '', ), $atts ) ); return '

' . $title . '

' . $content . '
'; } add_shortcode( 'd12-global' , 'd12_global' ); /* Green */ function d12_green( $atts, $content= NULL) { extract( shortcode_atts( array( 'title' => '', ), $atts ) ); return '

' . $title . '

' . $content . '
'; } add_shortcode( 'd12-green' , 'd12_green' ); /* Accept */ function d12_accept( $atts, $content= NULL) { extract( shortcode_atts( array( 'title' => '', ), $atts ) ); return '

' . $title . '

' . $content . '
'; } add_shortcode( 'd12-accept' , 'd12_accept' ); /* Stats */ function d12_stats( $atts, $content= NULL) { extract( shortcode_atts( array( 'title' => '', ), $atts ) ); return '

' . $title . '

' . $content . '
'; } add_shortcode( 'd12-stats' , 'd12_stats' ); /* * Register a function with TinyMCE */ add_action( 'init', 'd12mb_buttons' ); function d12mb_buttons() { if ( current_user_can('edit_posts') && current_user_can('edit_pages') ) { add_filter( "mce_external_plugins", "d12mb_add_buttons" ); add_filter( 'mce_buttons_2', 'd12mb_register_buttons' ); } } function d12mb_add_buttons( $plugin_array ) { $plugin_array['d12mb'] = plugins_url( 'js/d12mb.js', __FILE__ ); return $plugin_array; } function d12mb_register_buttons( $buttons ) { array_push( $buttons, 'd12-mb-button', 'd12-mb-button-2' ); return $buttons; } // Experiment to add shortcode to excerpts // wordpress.org/support/topic/how-to-enable-shortcodes-in-excerpts?replies=8#post-1843419 /** * Add an options page * * @since d12 Message Blocks 1.1 */ require plugin_basename( 'plugin-options.php' );