Changeset 6119
- Timestamp:
- 11/09/2016 10:51:17 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.5/includes/core/template-functions.php
r5814 r6119 309 309 $args = $stack = array(); 310 310 311 // Add 'b bp_template_stack' to the current filter array311 // Add 'bp_template_stack' to the current filter array. 312 312 $wp_current_filter[] = $tag; 313 313 314 // Sort 315 if ( ! isset( $merged_filters[ $tag ] ) ) { 316 ksort( $wp_filter[$tag] ); 317 $merged_filters[ $tag ] = true; 318 } 319 320 // Ensure we're always at the beginning of the filter array 321 reset( $wp_filter[ $tag ] ); 322 323 // Loop through 'bbp_template_stack' filters, and call callback functions 314 // Sort. 315 if ( class_exists( 'WP_Hook' ) ) { 316 $filter = $wp_filter[ $tag ]->callbacks; 317 } else { 318 $filter = &$wp_filter[ $tag ]; 319 320 if ( ! isset( $merged_filters[ $tag ] ) ) { 321 ksort( $filter ); 322 $merged_filters[ $tag ] = true; 323 } 324 } 325 326 // Ensure we're always at the beginning of the filter array. 327 reset( $filter ); 328 329 // Loop through 'bp_template_stack' filters, and call callback functions. 324 330 do { 325 foreach ( (array) current( $wp_filter[$tag]) as $the_ ) {331 foreach( (array) current( $filter ) as $the_ ) { 326 332 if ( ! is_null( $the_['function'] ) ) { 327 333 $args[1] = $stack; … … 329 335 } 330 336 } 331 } while ( next( $ wp_filter[$tag]) !== false );332 333 // Remove 'b bp_template_stack' from the current filter array337 } while ( next( $filter ) !== false ); 338 339 // Remove 'bp_template_stack' from the current filter array. 334 340 array_pop( $wp_current_filter ); 335 341 336 // Remove empties and duplicates 342 // Remove empties and duplicates. 337 343 $stack = array_unique( array_filter( $stack ) ); 338 344
Note: See TracChangeset
for help on using the changeset viewer.