Skip to:
Content

bbPress.org

Ticket #2190: 2190.01.patch

File 2190.01.patch, 1.5 KB (added by r-a-y, 12 years ago)
  • includes/replies/template-tags.php

    function bbp_has_replies( $args = '' ) { 
    118118
    119119        // Call the query
    120120        $bbp->reply_query = new WP_Query( $r );
    121        
     121
    122122        // Add pagination values to query object
    123123        $bbp->reply_query->posts_per_page = $r['posts_per_page'];
    124124        $bbp->reply_query->paged          = $r['paged'];
    function bbp_has_replies( $args = '' ) { 
    137137                // If pretty permalinks are enabled, make our pagination pretty
    138138                if ( $wp_rewrite->using_permalinks() ) {
    139139
    140                         // Page or single
    141                         if ( is_page() || is_single() ) {
    142                                 $base = get_permalink();
    143 
    144140                        // User's replies
    145                         } elseif ( bbp_is_single_user_replies() ) {
     141                        if ( bbp_is_single_user_replies() ) {
    146142                                $base = bbp_get_user_replies_created_url( bbp_get_displayed_user_id() );
    147143
     144                        // Root profile page
     145                        } elseif ( bbp_is_single_user() ) {
     146                                $base = bbp_get_user_profile_url( bbp_get_displayed_user_id() );
     147
     148                        // Page or single post
     149                        } elseif ( is_page() || is_single() ) {
     150                                $base = get_permalink();
     151
    148152                        // Single topic
    149153                        } else {
    150154                                $base = get_permalink( bbp_get_topic_id() );
    function bbp_reply_spam_link( $args = '' ) { 
    17561760         * @return string Reply spam link
    17571761         */
    17581762        function bbp_get_reply_spam_link( $args = '' ) {
    1759                
     1763
    17601764                // Parse arguments against default values
    17611765                $r = bbp_parse_args( $args, array(
    17621766                        'id'           => 0,