mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-30 18:24:31 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@37861 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -309,9 +309,11 @@ class WP_UnitTestCase extends PHPUnit_Framework_TestCase {
|
||||
}
|
||||
add_action( 'deprecated_function_run', array( $this, 'deprecated_function_run' ) );
|
||||
add_action( 'deprecated_argument_run', array( $this, 'deprecated_function_run' ) );
|
||||
add_action( 'deprecated_hook_run', array( $this, 'deprecated_function_run' ) );
|
||||
add_action( 'doing_it_wrong_run', array( $this, 'doing_it_wrong_run' ) );
|
||||
add_action( 'deprecated_function_trigger_error', '__return_false' );
|
||||
add_action( 'deprecated_argument_trigger_error', '__return_false' );
|
||||
add_action( 'deprecated_hook_trigger_error', '__return_false' );
|
||||
add_action( 'doing_it_wrong_trigger_error', '__return_false' );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user