deprecated_function_run
Action HookDescription
Fires when a deprecated function is called.Hook Information
| File Location | 
                                wp-includes/functions.php
                                
                                    View on GitHub
                                
                             | 
                        
| Hook Type | Action | 
| Line Number | 5542 | 
                        
Hook Parameters
| Type | Name | Description | 
|---|---|---|
                                    string
                                 | 
                                
                                    $function_name
                                 | 
                                The function that was called. | 
                                    string
                                 | 
                                
                                    $replacement
                                 | 
                                The function that should have been called. | 
                                    string
                                 | 
                                
                                    $version
                                 | 
                                The version of WordPress that deprecated the function. | 
Usage Examples
                        Basic Usage
                    
                    <?php
// Hook into deprecated_function_run
add_action('deprecated_function_run', 'my_custom_function', 10, 3);
function my_custom_function($function_name, $replacement, $version) {
    // Your custom code here
}
                        
                    Source Code Context
                        wp-includes/functions.php:5542
                        - How this hook is used in WordPress core
                    
                    <?php
5537  	 *
5538  	 * @param string $function_name The function that was called.
5539  	 * @param string $replacement   The function that should have been called.
5540  	 * @param string $version       The version of WordPress that deprecated the function.
5541  	 */
5542  	do_action( 'deprecated_function_run', $function_name, $replacement, $version );
5543  
5544  	/**
5545  	 * Filters whether to trigger an error for deprecated functions.
5546  	 *
5547  	 * @since 2.5.0
                    PHP Documentation
<?php
/**
	 * Fires when a deprecated function is called.
	 *
	 * @since 2.5.0
	 *
	 * @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.
	 */
                
            
                        Quick Info
                    
                    - Hook Type: Action
 - Parameters: 3
 - File: wp-includes/functions.php
 
                        Related Hooks
                    
                    Related hooks will be displayed here in future updates.