deprecated_hook_run

Fires when a deprecated hook is called.

Description

do_action( 'deprecated_hook_run', (string) $hook, (string) $replacement, (string) $version, (string) $message ); 

Parameters (4)

0. $hook (string)
The hook that was called.
1. $replacement (string)
The hook that should be used as a replacement.
2. $version (string)
The version of WordPress that deprecated the argument used.
3. $message (string)
A message regarding the change.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'deprecated_hook_run', $hook, $replacement, $version, $message ); 
The following example is for adding a hook callback.
  1. // define the deprecated_hook_run callback 
  2. function action_deprecated_hook_run( $hook, $replacement, $version, $message ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'deprecated_hook_run', 'action_deprecated_hook_run', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'deprecated_hook_run', 'action_deprecated_hook_run', 10, 4 ); 

Defined (1)

The action is defined in the following location(s).

/wp-includes/functions.php  
  1. do_action( 'deprecated_hook_run', $hook, $replacement, $version, $message );