Skip to:
Content

BuddyPress.org

Changeset 8462


Ignore:
Timestamp:
05/31/2014 04:22:56 PM (12 years ago)
Author:
johnjamesjacoby
Message:

In bp_deregister_template_stack() wrap function_exists() check with is_array() check. Allows class methods to be removed from template stack locations. See #5671.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-template-loader.php

    r8461 r8462  
    163163
    164164        // Bail if no location, or function does not exist
    165         if ( empty( $location_callback ) || ! function_exists( $location_callback ) )
     165        if ( empty( $location_callback ) ) {
    166166                return false;
     167        }
     168
     169        // Bail if callback function does not exist
     170        if ( ! is_array( $location_callback ) ) {
     171                if ( ! function_exists( $location_callback ) ) {
     172                        return false;
     173                }
     174        }
    167175
    168176        // Add location callback to template stack
Note: See TracChangeset for help on using the changeset viewer.