deprecated_class_run
Action HookDescription
Fires when a deprecated class is called.Hook Information
File Location |
wp-includes/functions.php
View on GitHub
|
Hook Type | Action |
Line Number | 5705 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$class_name
|
The name of the class being instantiated. |
string
|
$replacement
|
The class or function that should have been called. |
string
|
$version
|
The version of WordPress that deprecated the class. |
Usage Examples
Basic Usage
<?php
// Hook into deprecated_class_run
add_action('deprecated_class_run', 'my_custom_function', 10, 3);
function my_custom_function($class_name, $replacement, $version) {
// Your custom code here
}
Source Code Context
wp-includes/functions.php:5705
- How this hook is used in WordPress core
<?php
5700 *
5701 * @param string $class_name The name of the class being instantiated.
5702 * @param string $replacement The class or function that should have been called.
5703 * @param string $version The version of WordPress that deprecated the class.
5704 */
5705 do_action( 'deprecated_class_run', $class_name, $replacement, $version );
5706
5707 /**
5708 * Filters whether to trigger an error for a deprecated class.
5709 *
5710 * @since 6.4.0
PHP Documentation
<?php
/**
* Fires when a deprecated class is called.
*
* @since 6.4.0
*
* @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.
*/
Quick Info
- Hook Type: Action
- Parameters: 3
- File: wp-includes/functions.php
Related Hooks
Related hooks will be displayed here in future updates.