Skip to:
Content

bbPress.org

Changeset 5945


Ignore:
Timestamp:
10/27/2015 11:21:08 AM (4 years ago)
Author:
netweb
Message:

Core: Restore empty $wp_filter[ $tag ] check and update PHPDoc in bbp_get_template_stack()

See #2871

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/template-functions.php

    r5944 r5945  
    297297 * @see bbp_register_template_stack()
    298298 *
    299  * @since bbPress (r4323)
     299 * @since 2.2.0 bbPress (r4323)
     300 * @since 2.6.0 bbPress (r5944) Added support for `WP_Hook`
    300301 *
    301302 * @global array $wp_filter Stores all of the filters
     
    315316    $wp_current_filter[] = $tag;
    316317
     318    // Bail if no stack setup
     319    if ( empty( $wp_filter[ $tag ] ) ) {
     320        return array();
     321    }
     322
     323    // Check if WP_Hook class exists, see #WP17817
    317324    if ( class_exists( 'WP_Hook' ) ) {
    318325        $filter = $wp_filter[ $tag ]->callbacks;
Note: See TracChangeset for help on using the changeset viewer.