Making WordPress.org


Ignore:
Timestamp:
09/12/2016 06:48:52 PM (8 years ago)
Author:
coffee2code
Message:

Handbook plugin: Disable o2 plugin processing of handbook post content.

Prevents inclusion of 'login to reply', 'reply', 'follow', and resolvedposts-related links and associated markup.

Fixes #2023.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/handbook.php

    r3772 r4036  
    131131        add_filter( 'body_class',                         array( $this, 'add_body_class' ) );
    132132        add_filter( 'post_class',                         array( $this, 'add_post_class' ) );
     133        add_filter( 'o2_process_the_content',             array( $this, 'disable_o2_processing' ) );
    133134    }
    134135
     
    389390    }
    390391
     392    /**
     393     * Disables handbook post content processing by the o2 plugin.
     394     *
     395     * @param bool $process_with_o2 Is o2 about to process the post content?
     396     * @return bool
     397     */
     398    function disable_o2_processing( $process_with_o2 ) {
     399        return ( $this->post_type === get_post_type() ) ? false : $process_with_o2;
     400    }
     401
    391402}
Note: See TracChangeset for help on using the changeset viewer.