Make WordPress Core


Ignore:
Timestamp:
06/25/2016 07:56:19 PM (8 years ago)
Author:
boonebgorges
Message:

Allow action and filter hooks to be deprecated.

When a filter or action hook is deprecated, the corresponding apply_filters()
or do_action() calls should be switched out with apply_filters_deprecated()
or do_action_deprecated(). The latter functions will throw a deprecation
before invoking the original hook.

Props solarissmoke, SergeyBiryukov, DrewAPicture.
Fixes #10441.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase.php

    r37319 r37861  
    310310        add_action( 'deprecated_function_run', array( $this, 'deprecated_function_run' ) );
    311311        add_action( 'deprecated_argument_run', array( $this, 'deprecated_function_run' ) );
     312        add_action( 'deprecated_hook_run', array( $this, 'deprecated_function_run' ) );
    312313        add_action( 'doing_it_wrong_run', array( $this, 'doing_it_wrong_run' ) );
    313314        add_action( 'deprecated_function_trigger_error', '__return_false' );
    314315        add_action( 'deprecated_argument_trigger_error', '__return_false' );
     316        add_action( 'deprecated_hook_trigger_error',     '__return_false' );
    315317        add_action( 'doing_it_wrong_trigger_error',      '__return_false' );
    316318    }
Note: See TracChangeset for help on using the changeset viewer.