Whoops! You are right, of course!
The more correct fix is to put this in the beginning of thempr_shortcodes_init() function (about line 193)
global $mpr_version ;
That way, the proper value of the variable is only defined once (at the beginning of the file).
I just posted version 2.21, which includes that fix (and gave you credit in the readme). Thanks!
Thank you for the credits.
Because we needed some customizations i made some changes to your plugin.
Feel free to integrate the following code:
1) Added Shortcode for hiding the post date and show the post thumbnail image
// hide post date with [ ... showdate=no]
// line ~ 459
if ( isset ($atts['showdate']))
{
$showdate = false ;
}
else
{
$showdate = true ;
}
// show thumbnail
if ( isset ($atts['showthumbnail']))
{
$showthumbnail = true ;
}
else
{
$showthumbnail = false ;
}
[...]
// line ~522 after title:
</a></strong>
<?php
if($showdate)
{
echo " (" . $x->post_date . ")";
}
[...]
if ($atts['showall'])
{
echo "<em>(status = " . $x->post_status . ")</em>" ;
}
echo "<br>" ;
// show thumbnail with class "globalImageStyle"
if($showthumbnail)
{
echo get_the_post_thumbnail( $page->ID, 'thumbnail', array( 'class' => 'globalImageStyle' ) );
}