Skip to:
Content

bbPress.org


Ignore:
Timestamp:
10/30/2011 03:42:59 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Remove clever code from bbp-core-compatibility.php. Add query var for editing forums from within the theme to bbp_pre_get_posts().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-core-compatibility.php

    r3516 r3550  
    10961096
    10971097            // Page exists where this archive should be
    1098             if ( $page = bbp_get_page_by_path( $bbp->root_slug ) ) {
     1098            $page = bbp_get_page_by_path( $bbp->root_slug );
     1099            if ( !empty( $page ) ) {
    10991100
    11001101                // Start output buffer
     
    11211122
    11221123            // Page exists where this archive should be
    1123             if ( $page = bbp_get_page_by_path( $bbp->topic_archive_slug ) ) {
     1124            $page = bbp_get_page_by_path( $bbp->topic_archive_slug );
     1125            if ( !empty( $page ) ) {
    11241126
    11251127                // Start output buffer
     
    15111513 * @uses bbp_is_query_name() Check if query name is 'bbp_widget'
    15121514 * @uses bbp_get_view_query_args() To get the view query args
     1515 * @uses bbp_get_forum_post_type() To get the forum post type
    15131516 * @uses bbp_get_topic_post_type() To get the topic post type
    15141517 * @uses bbp_get_reply_post_type() To get the reply post type
     
    16321635    } elseif ( !empty( $is_edit ) ) {
    16331636
     1637        // We are editing a forum
     1638        if ( $posts_query->get( 'post_type' ) == bbp_get_forum_post_type() ) {
     1639            $posts_query->bbp_is_forum_edit = true;
     1640
    16341641        // We are editing a topic
    1635         if ( $posts_query->get( 'post_type' ) == bbp_get_topic_post_type() ) {
     1642        } elseif ( $posts_query->get( 'post_type' ) == bbp_get_topic_post_type() ) {
    16361643            $posts_query->bbp_is_topic_edit = true;
    16371644
Note: See TracChangeset for help on using the changeset viewer.