Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/03/2021 07:19:06 AM (4 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 trunk for 2.7.0. See #3358.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/topics/template.php

    r7148 r7175  
    29122912            $base = bbp_get_user_profile_url( bbp_get_displayed_user_id() );
    29132913
     2914        // Any single post (for shortcodes, ahead of shortcodeables below)
     2915        } elseif ( is_singular() ) {
     2916            $base = get_permalink();
     2917
    29142918        // View
    29152919        } elseif ( bbp_is_single_view() ) {
     
    29192923        } elseif ( bbp_is_topic_tag() ) {
    29202924            $base = bbp_get_topic_tag_link();
    2921 
    2922         // Page or single post
    2923         } elseif ( is_page() || is_single() ) {
    2924             $base = get_permalink();
    29252925
    29262926        // Forum archive
Note: See TracChangeset for help on using the changeset viewer.