Bug fix
Repaired an issue causing the content of some shortcodes to appear at top of post, rather than at their insertion point in the post.
This commit is contained in:
parent
16f76d6007
commit
7529f11ae5
@ -3,7 +3,7 @@
|
|||||||
* Plugin Name: d12 Message Blocks
|
* Plugin Name: d12 Message Blocks
|
||||||
* Plugin URI: http://kjodle.net/wordpress/d12-message-blocks/
|
* Plugin URI: http://kjodle.net/wordpress/d12-message-blocks/
|
||||||
* Description: Adds shortcodes for message blocks.
|
* Description: Adds shortcodes for message blocks.
|
||||||
* Version: 2.0
|
* Version: 2.1
|
||||||
* Author: Kenneth John Odle
|
* Author: Kenneth John Odle
|
||||||
* Author URI: http://kjodle.net/
|
* Author URI: http://kjodle.net/
|
||||||
* Text Domain: d12-message-blocks
|
* Text Domain: d12-message-blocks
|
||||||
@ -133,33 +133,37 @@ add_action( 'admin_enqueue_scripts', 'd12_shortcodes_admin_styles' );
|
|||||||
|
|
||||||
/* Nutshell */
|
/* Nutshell */
|
||||||
function d12_nutshell( $atts, $content= NULL) {
|
function d12_nutshell( $atts, $content= NULL) {
|
||||||
echo '<div class="d12-block d12-nutshell"><div class="d12-sc-text"><p><strong>';
|
$filestring = '<div class="d12-block d12-nutshell"><div class="d12-sc-text"><p><strong>' .
|
||||||
_e( 'This article in a nutshell:', 'd12-message-blocks' );
|
__( 'This article in a nutshell:', 'd12-message-blocks' )
|
||||||
echo '</strong></p>' . $content . '</div></div>';
|
. '</strong></p>' . $content . '</div></div>';
|
||||||
|
return $filestring;
|
||||||
}
|
}
|
||||||
add_shortcode( 'd12-nutshell' , 'd12_nutshell' );
|
add_shortcode( 'd12-nutshell' , 'd12_nutshell' );
|
||||||
|
|
||||||
/* Update */
|
/* Update */
|
||||||
function d12_update( $atts, $content= NULL) {
|
function d12_update( $atts, $content= NULL) {
|
||||||
echo '<div class="d12-block d12-update"><div class="d12-sc-text"><p><strong>';
|
$filestring = '<div class="d12-block d12-update"><div class="d12-sc-text"><p><strong>' .
|
||||||
_e( 'Update Information:', 'd12-message-blocks' );
|
__( 'Update Information:', 'd12-message-blocks' )
|
||||||
echo '</strong></p>' . $content . '</div></div>';
|
. '</strong></p>' . $content . '</div></div>';
|
||||||
|
return $filestring;
|
||||||
}
|
}
|
||||||
add_shortcode( 'd12-update' , 'd12_update' );
|
add_shortcode( 'd12-update' , 'd12_update' );
|
||||||
|
|
||||||
/* Attach */
|
/* Attach */
|
||||||
function d12_attach( $atts, $content= NULL) {
|
function d12_attach( $atts, $content= NULL) {
|
||||||
echo '<div class="d12-block d12-attach"><div class="d12-sc-text"><p><strong>';
|
$filestring = '<div class="d12-block d12-attach"><div class="d12-sc-text"><p><strong>' .
|
||||||
_e( 'Downloads:', 'd12-message-blocks' );
|
__( 'Downloads:', 'd12-message-blocks' )
|
||||||
echo '</strong></p>' . $content . '</div></div>';
|
. '</strong></p>' . $content . '</div></div>';
|
||||||
|
return $filestring;
|
||||||
}
|
}
|
||||||
add_shortcode( 'd12-attach' , 'd12_attach' );
|
add_shortcode( 'd12-attach' , 'd12_attach' );
|
||||||
|
|
||||||
/* Delete */
|
/* Delete */
|
||||||
function d12_delete( $atts, $content= NULL) {
|
function d12_delete( $atts, $content= NULL) {
|
||||||
echo '<div class="d12-block d12-delete"><div class="d12-sc-text"><p><strong>';
|
$filestring = '<div class="d12-block d12-delete"><div class="d12-sc-text"><p><strong>' .
|
||||||
_e( 'This page has been marked for deletion.', 'd12-message-blocks' );
|
__( 'This page has been marked for deletion.', 'd12-message-blocks' )
|
||||||
echo '</strong></p>' . $content . '</div></div>';
|
. '</strong></p>' . $content . '</div></div>';
|
||||||
|
return $filestring;
|
||||||
}
|
}
|
||||||
add_shortcode( 'd12-delete' , 'd12_delete' );
|
add_shortcode( 'd12-delete' , 'd12_delete' );
|
||||||
|
|
||||||
@ -170,65 +174,73 @@ function d12_part( $atts, $content= NULL) {
|
|||||||
'series' => '',
|
'series' => '',
|
||||||
), $atts )
|
), $atts )
|
||||||
);
|
);
|
||||||
echo '<div class="d12-block d12-part"><div class="d12-sc-text"><p><strong>';
|
$filestring = '<div class="d12-block d12-part"><div class="d12-sc-text"><p><strong>' .
|
||||||
printf(__( 'This page is part of a series on %s', 'd12-message-blocks' ), $series );
|
printf(__( 'This page is part of a series on %s', 'd12-message-blocks' ), $series )
|
||||||
echo '.</strong></p>' . $content . '</div></div> ';
|
. '.</strong></p>' . $content . '</div></div> ';
|
||||||
|
return $filestring;
|
||||||
}
|
}
|
||||||
add_shortcode( 'd12-part' , 'd12_part' );
|
add_shortcode( 'd12-part' , 'd12_part' );
|
||||||
|
|
||||||
/* Mentions */
|
/* Mentions */
|
||||||
function d12_mentions( $atts, $content= NULL) {
|
function d12_mentions( $atts, $content= NULL) {
|
||||||
echo '<div class="d12-block d12-mention"><div class="d12-sc-text"><p><strong>';
|
$filestring = '<div class="d12-block d12-mention"><div class="d12-sc-text"><p><strong>' .
|
||||||
_e( 'This page has been mentioned here:', 'd12-message-blocks' );
|
__( 'This page has been mentioned here:', 'd12-message-blocks' )
|
||||||
echo '</strong></p>' . $content . '</div></div>';
|
. '</strong></p>' . $content . '</div></div>';
|
||||||
|
return $filestring;
|
||||||
}
|
}
|
||||||
add_shortcode( 'd12-mentions' , 'd12_mentions' );
|
add_shortcode( 'd12-mentions' , 'd12_mentions' );
|
||||||
|
|
||||||
/* Warning */
|
/* Warning */
|
||||||
function d12_warning( $atts, $content= NULL) {
|
function d12_warning( $atts, $content= NULL) {
|
||||||
echo '<div class="d12-block d12-warning"><div class="d12-sc-text"><p><strong>';
|
$filestring = '<div class="d12-block d12-warning"><div class="d12-sc-text"><p><strong>' .
|
||||||
_e ( 'Warning!', 'd12-message-blocks' );
|
__ ( 'Warning!', 'd12-message-blocks' )
|
||||||
echo '</strong></p>' . $content . '</div></div>';
|
. '</strong></p>' . $content . '</div></div>';
|
||||||
|
return $filestring;
|
||||||
}
|
}
|
||||||
add_shortcode( 'd12-warning' , 'd12_warning' );
|
add_shortcode( 'd12-warning' , 'd12_warning' );
|
||||||
|
|
||||||
/* Important */
|
/* Important */
|
||||||
function d12_important( $atts, $content= NULL) {
|
function d12_important( $atts, $content= NULL) {
|
||||||
echo '<div class="d12-block d12-important"><div class="d12-sc-text"><p><strong>';
|
$filestring = '<div class="d12-block d12-important"><div class="d12-sc-text"><p><strong>' .
|
||||||
_e ( 'Important!', 'd12-message-blocks' );
|
__ ( 'Important!', 'd12-message-blocks' )
|
||||||
echo '</strong></p>' . $content . '</div></div>';
|
. '</strong></p>' . $content . '</div></div>';
|
||||||
|
return $filestring;
|
||||||
}
|
}
|
||||||
add_shortcode( 'd12-important' , 'd12_important' );
|
add_shortcode( 'd12-important' , 'd12_important' );
|
||||||
|
|
||||||
/* Notice */
|
/* Notice */
|
||||||
function d12_notice( $atts, $content= NULL) {
|
function d12_notice( $atts, $content= NULL) {
|
||||||
echo '<div class="d12-block d12-notice"><div class="d12-sc-text"><p><strong>';
|
$filestring = '<div class="d12-block d12-notice"><div class="d12-sc-text"><p><strong>' .
|
||||||
_e( 'Notice!', 'd12-message-blocks' );
|
__( 'Notice!', 'd12-message-blocks' )
|
||||||
echo '</strong></p>' . $content . '</div></div>';
|
. '</strong></p>' . $content . '</div></div>';
|
||||||
|
return $filestring;
|
||||||
}
|
}
|
||||||
add_shortcode( 'd12-notice' , 'd12_notice' );
|
add_shortcode( 'd12-notice' , 'd12_notice' );
|
||||||
|
|
||||||
/* Error */
|
/* Error */
|
||||||
function d12_error( $atts, $content= NULL) {
|
function d12_error( $atts, $content= NULL) {
|
||||||
echo '<div class="d12-block d12-error"><div class="d12-sc-text"><p><strong>';
|
$filestring = '<div class="d12-block d12-error"><div class="d12-sc-text"><p><strong>' .
|
||||||
_e( 'Error!', 'd12-message-blocks' );
|
__( 'Error!', 'd12-message-blocks' )
|
||||||
echo '</strong></p>' . $content . '</div></div>';
|
. '</strong></p>' . $content . '</div></div>';
|
||||||
|
return $filestring;
|
||||||
}
|
}
|
||||||
add_shortcode( 'd12-error' , 'd12_error' );
|
add_shortcode( 'd12-error' , 'd12_error' );
|
||||||
|
|
||||||
/* Caution */
|
/* Caution */
|
||||||
function d12_caution( $atts, $content= NULL) {
|
function d12_caution( $atts, $content= NULL) {
|
||||||
echo '<div class="d12-block d12-caution"><div class="d12-sc-text"><p><strong>';
|
$filestring = '<div class="d12-block d12-caution"><div class="d12-sc-text"><p><strong>' .
|
||||||
_e( 'Caution!', 'd12-message-blocks' );
|
__( 'Caution!', 'd12-message-blocks' )
|
||||||
echo '</strong></p>' . $content . '</div></div>';
|
. '</strong></p>' . $content . '</div></div>';
|
||||||
|
return $filestring;
|
||||||
}
|
}
|
||||||
add_shortcode( 'd12-caution' , 'd12_caution' );
|
add_shortcode( 'd12-caution' , 'd12_caution' );
|
||||||
|
|
||||||
/* Archive */
|
/* Archive */
|
||||||
function d12_archive( $atts, $content= NULL) {
|
function d12_archive( $atts, $content= NULL) {
|
||||||
echo '<div class="d12-block d12-archive"><div class="d12-sc-text"><p><strong>';
|
$filestring = '<div class="d12-block d12-archive"><div class="d12-sc-text"><p><strong>' .
|
||||||
_e( 'This page has been archived.', 'd12-message-blocks' );
|
__( 'This page has been archived.', 'd12-message-blocks' )
|
||||||
echo '</strong></p>' . $content . '</div></div>';
|
. '</strong></p>' . $content . '</div></div>';
|
||||||
|
return $filestring;
|
||||||
}
|
}
|
||||||
add_shortcode( 'd12-archive' , 'd12_archive' );
|
add_shortcode( 'd12-archive' , 'd12_archive' );
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ Tags: shortcodes, message blocks, posts, pages
|
|||||||
Donate link: http://kjodle.info/support
|
Donate link: http://kjodle.info/support
|
||||||
Requires at least: 2.5
|
Requires at least: 2.5
|
||||||
Tested up to: 4.3.1
|
Tested up to: 4.3.1
|
||||||
Stable tag: 2.0
|
Stable tag: 2.1
|
||||||
License: GPLv2 or later
|
License: GPLv2 or later
|
||||||
License URI: http://www.gnu.org/licenses/gpl.html
|
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/).
|
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 ==
|
== Installation ==
|
||||||
|
|
||||||
@ -75,6 +77,9 @@ You can add any html you like in the popup window, and it will be passed to the
|
|||||||
|
|
||||||
== Changelog ==
|
== 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 =
|
= 2.0 =
|
||||||
* Added an option page allowing users to select from 10 different border styles and 11 different color schemes.
|
* Added an option page allowing users to select from 10 different border styles and 11 different color schemes.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user