WordPress.org

Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #16245


Ignore:
Timestamp:
01/15/2011 08:51:30 PM (7 years ago)
Author:
scribu
Comment:

Reproduced with r17312.

Cleaned up the example code slightly.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16245

    • Property Severity changed from normal to major
  • Ticket #16245 – Description

    initial v2  
    33{{{
    44function run_once() {
    5 remove_filter( 'foobar', 'run_once' );
    6 return 'test';
     5        remove_filter( current_filter(), __FUNCTION__ );
     6        return 'test';
    77}
    88add_filter( 'foobar', 'run_once' );
    99
    10 add_filter( 'foobar', function($test) {return 'test again';}, 11 );
     10function another_filter() {
     11        return 'test again';
     12}
     13add_filter( 'foobar', 'another_filter', 11 );
    1114
    12 echo apply_filters( 'foobar', '', 'huh' );
     15echo apply_filters( 'foobar', '' );
    1316}}}
    1417