deprecated_function_run
Fires when a deprecated function is called.
Usage
add_action( 'deprecated_function_run', 'wp_kama_deprecated_function_run_action', 10, 3 );
/**
* Function for `deprecated_function_run` action-hook.
*
* @param string $function_name The function that was called.
* @param string $replacement The function that should have been called.
* @param string $version The version of WordPress that deprecated the function.
*
* @return void
*/
function wp_kama_deprecated_function_run_action( $function_name, $replacement, $version ){
// action...
}
- $function_name(string)
- The function that was called.
- $replacement(string)
- The function that should have been called.
- $version(string)
- The version of WordPress that deprecated the function.
Changelog
| Since 2.5.0 | Introduced. |
Where the hook is called
deprecated_function_run
wp-includes/functions.php 5564
do_action( 'deprecated_function_run', $function_name, $replacement, $version );
Where the hook is used in WordPress
wp-includes/rest-api.php 243
add_action( 'deprecated_function_run', 'rest_handle_deprecated_function', 10, 3 );