deprecated_hook_run
Fires when a deprecated hook is called.
Использование
add_action( 'deprecated_hook_run', 'wp_kama_deprecated_hook_run_action', 10, 4 );
/**
* Function for `deprecated_hook_run` action-hook.
*
* @param string $hook The hook that was called.
* @param string $replacement The hook that should be used as a replacement.
* @param string $version The version of WordPress that deprecated the argument used.
* @param string $message A message regarding the change.
*
* @return void
*/
function wp_kama_deprecated_hook_run_action( $hook, $replacement, $version, $message ){
// action...
}
- $hook(строка)
- The hook that was called.
- $replacement(строка)
- The hook that should be used as a replacement.
- $version(строка)
- The version of WordPress that deprecated the argument used.
- $message(строка)
- A message regarding the change.
Список изменений
| С версии 4.6.0 | Введена. |
Где вызывается хук
deprecated_hook_run
wp-includes/functions.php 5960
do_action( 'deprecated_hook_run', $hook, $replacement, $version, $message );