Changes between Initial Version and Version 1 of Ticket #43621
- Timestamp:
- 03/23/2018 05:54:15 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #43621 – Description
initial v1 13 13 add_action( 'run_many_times', function() { 14 14 // do stuff once and self-destruct 15 remove_ filter( 'the_title', current( $GLOBALS['wp_filter'][ current_filter() ]->callbacks[ 10 ] )['function'] );15 remove_action( 'run_many_times', current( $GLOBALS['wp_filter'][ current_filter() ]->callbacks[ 10 ] )['function'] ); 16 16 } ); 17 17 }}} … … 23 23 add_action( 'run_many_times', $null = function() use ( &$once ) { 24 24 // do stuff once and self-destruct 25 remove_ filter( 'the_title', $once );25 remove_action( 'run_many_times', $once ); 26 26 } ); 27 27 }}} … … 32 32 33 33 - `add_self_destructing_filter()` 34 - `add_ephem aral_filter()`34 - `add_ephemeral_filter()` 35 35 open to other suggestions :)