Making WordPress.org

Changeset 4741


Ignore:
Timestamp:
01/19/2017 11:32:45 PM (5 years ago)
Author:
pento
Message:

Handbook: Only apply Handbook rules on singular pages - not on search results, for example.

See #2407.

File:
1 edited

Legend:

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

    r4695 r4741  
    149149     */
    150150    function add_body_class( $classes ) {
    151         if ( wporg_is_handbook( $this->post_type ) ) {
     151        if ( is_singular() && wporg_is_handbook( $this->post_type ) ) {
    152152            $classes[] = 'single-handbook';
    153153        }
     
    395395     */
    396396    function disable_o2_processing( $process_with_o2 ) {
    397         return ( $this->post_type === get_post_type() ) ? false : $process_with_o2;
     397        return ( is_singular() && $this->post_type === get_post_type() ) ? false : $process_with_o2;
    398398    }
    399399
     
    405405     */
    406406    function o2_application_container( $container ) {
    407         return ( $this->post_type === get_post_type() ) ? '#primary' : $container;
     407        return ( is_singular() && $this->post_type === get_post_type() ) ? '#primary' : $container;
    408408    }
    409409
     
    416416     */
    417417    function o2_view_type( $view_type ) {
    418         return ( $this->post_type === get_post_type() ) ? 'single' : $view_type;
     418        return ( is_singular() && $this->post_type === get_post_type() ) ? 'single' : $view_type;
    419419    }
    420420
Note: See TracChangeset for help on using the changeset viewer.