Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/03/2021 07:21:09 AM (6 years ago)
Author:
johnjamesjacoby
Message:

Theme Compatibility: improve handling of shortcodes in some template functions.

This commit swaps out is_page() || is_single() for is_singular() which is easier to understand, and also raises the priority of that conditional check inside bbp_get_topics_pagination_base(), allowing it to work as intended inside of topic views and tags shortcode usages.

In branches/2.6 for 2.6.7. Fixes #3358.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/src/includes/users/template.php

    r7157 r7176  
    22952295                $retval = true;
    22962296
    2297         // Looking at a single topic, topic is open, and forum is open
    2298         } elseif ( ( bbp_is_single_topic() || is_page() || is_single() ) && bbp_is_topic_open() && bbp_is_forum_open() && bbp_is_topic_published() ) {
     2297        // Looking at single topic (and singulars), topic is open, and forum is open
     2298        } elseif ( ( bbp_is_single_topic() || is_singular() ) && bbp_is_topic_open() && bbp_is_forum_open() && bbp_is_topic_published() ) {
    22992299                $retval = bbp_current_user_can_publish_replies();
    23002300
Note: See TracChangeset for help on using the changeset viewer.