deprecated_constructor_run
Fires when a deprecated constructor is called.
Description
do_action( 'deprecated_constructor_run', (string) $class, (string) $version, (string) $parent_class );
Parameters (3)
- 0. $class (string)
- The class containing the deprecated constructor.
- 1. $version (string)
- The version of WordPress that deprecated the function.
- 2. $parent_class (string)
- The parent class calling the deprecated constructor.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'deprecated_constructor_run', $class, $version, $parent_class );
- The following example is for adding a hook callback.
- // define the deprecated_constructor_run callback
- function action_deprecated_constructor_run( $class, $version, $parent_class ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'deprecated_constructor_run', 'action_deprecated_constructor_run', 10, 3 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'deprecated_constructor_run', 'action_deprecated_constructor_run', 10, 3 );
Defined (1)
The action is defined in the following location(s).
- /wp-includes/functions.php
- do_action( 'deprecated_constructor_run', $class, $version, $parent_class );