Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #43621


Ignore:
Timestamp:
03/23/2018 05:54:15 PM (7 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #43621 – Description

    initial v1  
    1313add_action( 'run_many_times', function() {
    1414    // 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'] );
    1616} );
    1717}}}
     
    2323add_action( 'run_many_times', $null = function() use ( &$once ) {
    2424    // do stuff once and self-destruct
    25     remove_filter( 'the_title', $once );
     25    remove_action( 'run_many_times', $once );
    2626} );
    2727}}}
     
    3232
    3333- `​add_self_destructing_filter()`
    34 - `add_ephemaral_filter()`
     34- `add_ephemeral_filter()`
    3535open to other suggestions :)