Skip to:
Content

bbPress.org

Changeset 6288


Ignore:
Timestamp:
02/14/2017 06:33:06 PM (8 years ago)
Author:
johnjamesjacoby
Message:

Theme Compat: Add is_ parameters to various query-reset procedures.

This ensures the state of the wp_query global is what someone can safely expect for it to be. It also is used through-out WordPress as a way to auto-assign body classes and various other environmental tweaks.

Fixes #3055. Props sergeybiryukov.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/theme-compat.php

    r6196 r6288  
    680680            'post_type'      => bbp_get_reply_post_type(),
    681681            'post_status'    => bbp_get_public_status_id(),
     682            'is_archive'     => true,
    682683            'comment_status' => 'closed'
    683684        ) );
     
    708709            'post_type'      => bbp_get_reply_post_type(),
    709710            'post_status'    => bbp_get_reply_status(),
     711            'is_single'      => true,
    710712            'comment_status' => 'closed'
    711713        ) );
     
    724726            'post_type'      => '',
    725727            'post_status'    => bbp_get_public_status_id(),
     728            'is_archive'     => true,
    726729            'comment_status' => 'closed'
    727730        ) );
     
    740743            'post_type'      => '',
    741744            'post_status'    => bbp_get_public_status_id(),
     745            'is_archive'     => true,
    742746            'comment_status' => 'closed'
    743747        ) );
     
    769773            'post_title'     => sprintf( __( 'Topic Tag: %s', 'bbpress' ), '<span>' . bbp_get_topic_tag_name() . '</span>' ),
    770774            'post_status'    => bbp_get_public_status_id(),
    771             'comment_status' => 'closed',
    772             'is_tax'         => true
     775            'is_tax'         => true,
     776            'comment_status' => 'closed'
    773777        ) );
    774778    }
Note: See TracChangeset for help on using the changeset viewer.