[wp-trac] [WordPress Trac] #21267: Kill the serialization of $wp_filter in get_terms()
WordPress Trac
wp-trac at lists.automattic.com
Mon Aug 6 00:22:01 UTC 2012
#21267: Kill the serialization of $wp_filter in get_terms()
--------------------------+------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.5
Component: Cache | Version:
Severity: normal | Resolution:
Keywords: needs-patch |
--------------------------+------------------
Comment (by wonderboymusic):
FYI, here's a good way to debug this in functions.php or whatever:
{{{
function a_function( $filter ) { return $filter; }
class MyClass1 { function filter( $filter ) { return $filter; } }
class MyClass2 { static function filter( $filter ) { return $filter; } }
$my_class_1 = new MyClass1;
add_filter( 'list_terms_exclusions', 'a_function' );
add_filter( 'list_terms_exclusions', array( $my_class_1, 'filter' ) );
add_filter( 'list_terms_exclusions', array( 'MyClass2', 'filter' ) );
add_filter( 'list_terms_exclusions', array( 'MyClass2::filter' ) );
add_filter( 'list_terms_exclusions', array( 'MyClass2::filter', '' ) );
add_filter( 'list_terms_exclusions', function ( $filter ) { return
$filter; } );
print_r( $GLOBALS['wp_filter']['list_terms_exclusions'] );
get_terms( 'link_category' );
exit();
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21267#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list