The plugin appears to be made up of effectively three files?
wordpress-print-this-section.php
This file has the chunk of code with if statements and has this as the last line
class-wp-print-this-plugin.php
This appears to be where he is defining all the functions and has this as the last thing in it
/* FUNCTION: shortcode adds button and div container */
function print_this_shortcode( $atts, $content = null ) {
global $print_this_counter;
global $wp_rewrite;
global $post;
extract( shortcode_atts( array( ‘button_text’ => ‘Default’ ), $atts ) );
if ( ‘Default’ == $button_text ) $button_text = $this->admin_options[‘button_text’];
if ( ‘none’ == $this->admin_options[‘button_image’] && empty( $button_text ) ) { $button_text = __( ‘Print’, ‘print-this-section’ ); }
$button_image_src = FALSE;
if ( ‘none’ != $this->admin_options[‘button_image’] ) {
$button_image_src = WPPTS_PLUGIN_URL . “/images/” . $this->admin_options[‘button_image’];
}
/* Instead of using redirection and $wp-rewrite rules, I decided to go with simpler template redirection.
* Although it is not as pretty or sexy, the functionality and realability is greatly increased. This section
* takes the permalink and appends the propper query vars. The link is still bookmarkable, but not as SEO
* friendly. But we really don’t want our print page SEO friendly. This also works better with the default
* permalink structures which were causing the page to just reload instead of redirecting. This change also
* eliminated 3 functions making the plugin smaller and more efficient. -Version 2.0.4-
*/
if ( 1 == substr_count( get_permalink($post->ID), ‘?’ ) ) {
$print_this_link = get_permalink( $post->ID ) . ‘&printthis=1&printsect=’ . $print_this_counter;
} else {
$print_this_link = get_permalink( $post->ID ) . ‘?printthis=1&printsect=’ . $print_this_counter;
}
$output = ‘<div class=”print-this-button-shell”>’ . “n”;
$output .= ‘<button type=”button” class=”print-this-button” onClick=”parent.location=” . $print_this_link . ””> ’;
if ( $button_image_src ) {
$output .= ‘<img src=”‘ . $button_image_src . ‘” /> ‘;
}
$output .= $button_text . ‘ </button>’ . “n”;
$output .= “</div>n”;
$output .= “<!– Print This Section $print_this_counter Start –>n”;
$output .= ‘<div class=”print-this-content”>’;
$output .= do_shortcode( $content );
$output .= ‘<div class=”clear”></div>’ . “</div>n”;
$output .= “<!– Print This Section $print_this_counter End –>n”;
$print_this_counter++;
return $output;
print-this.php
This seems to be the code for the actual print page that is created when yo click the Print This button….. it is this page that is not parsing/processing the 2nd shortcode
I believe it is due to the way it is extracting the content of the post
<div id=”BlogContent”><?php extract_content(); ?></div>
wordpress-print-this-section (zip file of the plugin)





