Skip to:
Content

bbPress.org

Changeset 4694


Ignore:
Timestamp:
01/22/2013 03:49:42 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Fix broken single forum feeds by avoiding get_page_by_path(). Props alex-ye. Fixes #2167.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/common/functions.php

    r4655 r4694  
    106106     */
    107107    function bbp_get_time_since( $older_date, $newer_date = false ) {
    108        
     108
    109109        // Setup the strings
    110110        $unknown_text   = apply_filters( 'bbp_core_time_since_unknown_text',   __( 'sometime',  'bbpress' ) );
     
    573573        'empty_topic_tag_count'
    574574    ) ) );
    575    
     575
    576576    // Add the hidden (topic/reply) count title attribute strings because we
    577577    // don't need to run the math functions on these (see above)
     
    737737            return false;
    738738        }
    739        
     739
    740740    // User is logged in, so check their last posted time
    741741    } elseif ( !empty( $author_id ) ) {
     
    10561056
    10571057%2$s
    1058            
     1058
    10591059Post Link: %3$s
    10601060
     
    10641064
    10651065Login and visit the topic to unsubscribe from these emails.', 'bbpress' ),
    1066                
     1066
    10671067            $reply_author_name,
    10681068            $reply_content,
     
    14381438function bbp_verify_nonce_request( $action = '', $query_arg = '_wpnonce' ) {
    14391439
    1440     // Parse home_url() into pieces to remove query-strings, strange characters, 
     1440    // Parse home_url() into pieces to remove query-strings, strange characters,
    14411441    // and other funny things that plugins might to do to it.
    14421442    $parsed_home   = parse_url( home_url( '/', ( is_ssl() ? 'https://' : 'http://' ) ) );
     
    14951495                    if ( isset( $query_vars[bbp_get_forum_post_type()] ) ) {
    14961496
    1497                         // Get the forum by the path
    1498                         $forum    = get_page_by_path( $query_vars[bbp_get_forum_post_type()], OBJECT, bbp_get_forum_post_type() );
    1499                         $forum_id = $forum->ID;
    1500 
    15011497                        // Load up our own query
    15021498                        query_posts( array(
    15031499                            'post_type' => bbp_get_forum_post_type(),
    1504                             'ID'        => $forum_id,
     1500                            'name'      => $query_vars[bbp_get_forum_post_type()],
    15051501                            'feed'      => true
    15061502                        ) );
     
    15091505                        $meta_query = array( array(
    15101506                            'key'     => '_bbp_forum_id',
    1511                             'value'   => $forum_id,
     1507                            'value'   => bbp_get_forum_id(),
    15121508                            'type'    => 'numeric',
    15131509                            'compare' => '='
     
    15411537                            'feed'           => true,
    15421538                            'post_type'      => bbp_get_topic_post_type(),
    1543                             'post_parent'    => $forum_id,
     1539                            'post_parent'    => bbp_get_forum_id(),
    15441540                            'post_status'    => join( ',', array( bbp_get_public_status_id(), bbp_get_closed_status_id() ) ),
    15451541                            'posts_per_page' => bbp_get_topics_per_rss_page(),
Note: See TracChangeset for help on using the changeset viewer.