deprecated_class_run
Fires when a deprecated class is called.
Usage
add_action( 'deprecated_class_run', 'wp_kama_deprecated_class_run_action', 10, 3 );
/**
* Function for `deprecated_class_run` action-hook.
*
* @param string $class_name The name of the class being instantiated.
* @param string $replacement The class or function that should have been called.
* @param string $version The version of WordPress that deprecated the class.
*
* @return void
*/
function wp_kama_deprecated_class_run_action( $class_name, $replacement, $version ){
// action...
}
- $class_name(string)
- The name of the class being instantiated.
- $replacement(string)
- The class or function that should have been called.
- $version(string)
- The version of WordPress that deprecated the class.
Changelog
| Since 6.4.0 | Introduced. |
Where the hook is called
deprecated_class_run
wp-includes/functions.php 5727
do_action( 'deprecated_class_run', $class_name, $replacement, $version );