Support » Plugin: Attachments » Clash with WP Print Friendly

  • Hi,
    Since upgrading to the latest I notice that the Attachments Instance meta box now includes a print friendly option.

    This is generated by the plugin WP Print Friendly,
    Version 0.6 | By Erick Hitter, Steven K Word, and Oomph, Inc.

    This adds a print friendly link to the content. You can control the position of the link, above or below the_content, via the settings. When doing this it moves the print friendly link above or below the caption in the instance.

    WP Print Friendly has the options to act on various post types as does Attachments. In this case both are available on Pages and an additional CPT.

    Screenshot linked below. Site access possible if needed.

    Thanks

    http://wordpress.org/plugins/attachments/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Seems I miss placed the closing anchor tag.
    ‘Thanks’ links to screenshot.

    also here

    Plugin Author Jonathan Christopher

    (@jchristopher)

    Sorry, I’m not sure what the support request is? There is an issue with the two plugins together?

    Hi,

    You’re right, there is an issue. Since I upgraded your latest version, before that this did not occur, that I am aware of.

    I was partly bringing this to your attention as this issue may well occur with other plugins and therefore be a bigger issue.

    I was trying not to be too direct in my questioning as I realise support is free. If you have a solution to this then great. Otherwise I guess I will need to try and work around this myself.

    Thanks

    Plugin Author Jonathan Christopher

    (@jchristopher)

    Hi Graham, I’m sorry if I wasn’t clear, I’d like to help, but I’m not sure what the issue actually is? Is it that the WP Print Friendly UI is being injected into Attachments’ meta box? If so, I would take that to be an issue with how WP Print Friendly is inserting their UI.

    Thanks Jonathan,

    It is not the WP Print Friendly UI being injected, if by that you mean the dashboard UI, but the return based on the settings.

    The code in question in the WP Print Friendly Plugin is this, I think:

    public function filter_the_content_auto( $content ) {
    		$options = $this->get_options();
    
    		global $post;
    
    		if ( is_array( $options ) && array_key_exists( 'auto', $options ) && $options[ 'auto' ] == true && in_array( $post->post_type, $options[ 'post_types' ] ) && ! $this->is_print() ) {
    			extract( $options );
    
    			//Basic URL
    			$print_url = $this->print_url();
    
    			//Page URL, if necessary
    			if ( ! empty( $print_text_page ) && strpos( $post->post_content, '<!--nextpage-->' ) !== false ) {
    				$page = get_query_var( 'page' );
    				$page = $page ? $page : 1;
    
    				$print_url_page = $this->print_url( false, $page );
    			}
    
    			//Build link(s)
    			$link = '<p class="wpf_wrapper"><a class="' . $css_class . '" href="' . $print_url . '"' . ( $link_target == 'new' ? ' target="_blank"' : '' ) . '><img src="http://campaignforsocialscience.org.uk/wp-content/themes/cfss/icons/cfss-print-icon.png">' . $print_text . '</a>';
    
    			if ( isset( $print_url_page ) ) {
    				$link .= ' | ';
    				$link .= '<a class="' . $css_class . ' ' . $css_class . '_cur" href="' . $print_url_page . '"' . ( $link_target == 'new' ? ' target="_blank"' : '' ) . '>' . $print_text_page . '</a>';
    			}
    
    			$link .= '</p><!-- .wpf_wrapper -->';
    
    			//Place link(s)
    			if ( $placement == 'above' )
    				$content = $link . $content;
    			elseif ( $placement == 'below' )
    				$content = $content . $link;
    			elseif ( $placement == 'both' )
    				$content = $link . $content . $link;
    		}
    
    		return $content;

    What do you think, their problem…?
    Thanks

    Plugin Author Jonathan Christopher

    (@jchristopher)

    Hi Graham, I’m sorry but I still don’t quite understand the issue here. I don’t believe Attachments is doing anything wrong, but if you could give me a very high level view of what you expect to happen versus what is actually happening that might be helpful for me to wrap my head around what’s going on.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Clash with WP Print Friendly’ is closed to new replies.