Skip to:
Content

bbPress.org

Changeset 3631


Ignore:
Timestamp:
11/24/2011 11:39:06 AM (10 years ago)
Author:
johnjamesjacoby
Message:

Bail out of bbp_template_include_theme_supports() early if theme does not support bbPress.

File:
1 edited

Legend:

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

    r3630 r3631  
    825825function bbp_template_include_theme_supports( $template = '' ) {
    826826
     827    // Bail if current theme does not support bbPress
     828    if ( !current_theme_supports( 'bbpress' ) )
     829        return $template;
     830
    827831    // Viewing a user
    828832    if     ( bbp_is_single_user()      && ( $new_template = bbp_get_single_user_template()      ) ) :
     
    863867
    864868/**
    865  * In this next bit, either the current theme does not support bbPress, or
    866  * the theme author has incorrectly used add_theme_support( 'bbpress' )
    867  * and we are going to help them out by silently filling in the blanks.
     869 * Reset main query vars and filter 'the_content' to output a bbPress
     870 * template part as needed.
     871 *
     872 * @since bbPress (r3032)
     873 *
     874 * @param string $template
     875 *
     876 * @uses bbp_is_single_user() To check if page is single user
     877 * @uses bbp_get_single_user_template() To get user template
     878 * @uses bbp_is_single_user_edit() To check if page is single user edit
     879 * @uses bbp_get_single_user_edit_template() To get user edit template
     880 * @uses bbp_is_single_view() To check if page is single view
     881 * @uses bbp_get_single_view_template() To get view template
     882 * @uses bbp_is_forum_edit() To check if page is forum edit
     883 * @uses bbp_get_forum_edit_template() To get forum edit template
     884 * @uses bbp_is_topic_merge() To check if page is topic merge
     885 * @uses bbp_get_topic_merge_template() To get topic merge template
     886 * @uses bbp_is_topic_split() To check if page is topic split
     887 * @uses bbp_get_topic_split_template() To get topic split template
     888 * @uses bbp_is_topic_edit() To check if page is topic edit
     889 * @uses bbp_get_topic_edit_template() To get topic edit template
     890 * @uses bbp_is_reply_edit() To check if page is reply edit
     891 * @uses bbp_get_reply_edit_template() To get reply edit template
     892 * @uses bbp_set_theme_compat_template() To set the global theme compat template
    868893 */
    869894function bbp_template_include_theme_compat( $template = '' ) {
Note: See TracChangeset for help on using the changeset viewer.