deprecated_constructor_run
Fires when a deprecated constructor is called.
Usage
add_action( 'deprecated_constructor_run', 'wp_kama_deprecated_constructor_run_action', 10, 3 ); /** * Function for `deprecated_constructor_run` action-hook. * * @param string $class_name The class containing the deprecated constructor. * @param string $version The version of WordPress that deprecated the function. * @param string $parent_class The parent class calling the deprecated constructor. * * @return void */ function wp_kama_deprecated_constructor_run_action( $class_name, $version, $parent_class ){ // action... }
- $class_name(string)
- The class containing the deprecated constructor.
- $version(string)
- The version of WordPress that deprecated the function.
- $parent_class(string)
- The parent class calling the deprecated constructor.
Changelog
Since 4.3.0 | Introduced. |
Since 4.5.0 | Added the $parent_class parameter. |
Where the hook is called
deprecated_constructor_run
wp-includes/functions.php 5615
do_action( 'deprecated_constructor_run', $class_name, $version, $parent_class );