diff --git a/d12-message-blocks.php b/d12-message-blocks.php index 74c9bf6..75cf825 100644 --- a/d12-message-blocks.php +++ b/d12-message-blocks.php @@ -3,7 +3,7 @@ * Plugin Name: d12 Message Blocks * Plugin URI: http://kjodle.net/wordpress/d12-message-blocks/ * Description: Adds shortcodes for message blocks. - * Version: 2.0 + * Version: 2.1 * Author: Kenneth John Odle * Author URI: http://kjodle.net/ * Text Domain: d12-message-blocks @@ -133,33 +133,37 @@ add_action( 'admin_enqueue_scripts', 'd12_shortcodes_admin_styles' ); /* Nutshell */ function d12_nutshell( $atts, $content= NULL) { - echo '

'; - _e( 'This article in a nutshell:', 'd12-message-blocks' ); - echo '

' . $content . '
'; + $filestring = '

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

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

'; - _e( 'Update Information:', 'd12-message-blocks' ); - echo '

' . $content . '
'; + $filestring = '

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

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

'; - _e( 'Downloads:', 'd12-message-blocks' ); - echo '

' . $content . '
'; + $filestring = '

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

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

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

' . $content . '
'; + $filestring = '

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

' . $content . '
'; + return $filestring; } add_shortcode( 'd12-delete' , 'd12_delete' ); @@ -170,65 +174,73 @@ function d12_part( $atts, $content= NULL) { 'series' => '', ), $atts ) ); - echo '

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

' . $content . '
'; + $filestring = '

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

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

'; - _e( 'This page has been mentioned here:', 'd12-message-blocks' ); - echo '

' . $content . '
'; + $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) { - echo '

'; - _e ( 'Warning!', 'd12-message-blocks' ); - echo '

' . $content . '
'; + $filestring = '

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

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

'; - _e ( 'Important!', 'd12-message-blocks' ); - echo '

' . $content . '
'; + $filestring = '

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

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

'; - _e( 'Notice!', 'd12-message-blocks' ); - echo '

' . $content . '
'; + $filestring = '

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

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

'; - _e( 'Error!', 'd12-message-blocks' ); - echo '

' . $content . '
'; + $filestring = '

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

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

'; - _e( 'Caution!', 'd12-message-blocks' ); - echo '

' . $content . '
'; + $filestring = '

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

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

'; - _e( 'This page has been archived.', 'd12-message-blocks' ); - echo '

' . $content . '
'; + $filestring = '

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

' . $content . '
'; + return $filestring; } add_shortcode( 'd12-archive' , 'd12_archive' ); diff --git a/readme.txt b/readme.txt index 4437fac..f03eea5 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: shortcodes, message blocks, posts, pages Donate link: http://kjodle.info/support Requires at least: 2.5 Tested up to: 4.3.1 -Stable tag: 2.0 +Stable tag: 2.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl.html @@ -20,6 +20,8 @@ Want to see it in action? Check out [my demo page](http://techblog.kjodle.net/20 Want to check it out in different themes? Check out [my multi-theme demo page](http://waybeta.net/2015/07/d12-message-blocks-wordpress-plugin/). +Questions? Suggestions? Issues? Reach out to me on Twitter at [@kjodle](http://twitter.com/#!/kjodle) or [@iswpw](http://twitter.com/#!/iswpw), or in the plugin's [support forum](https://wordpress.org/support/plugin/d12-message-blocks). + == Installation == @@ -75,6 +77,9 @@ You can add any html you like in the popup window, and it will be passed to the == Changelog == += 2.1 = +*Fixed an issue with some shortcodes appearing at the beginning of the post instead of where they were inserted in post. + = 2.0 = * Added an option page allowing users to select from 10 different border styles and 11 different color schemes.