do_action_deprecated()
Fires functions attached to a deprecated action hook.
When an action hook is deprecated, the do_action() call is replaced with do_action_deprecated(), which triggers a deprecation notice and then fires the original hook.
Хуки из функции
Возвращает
null
. Ничего (null).
Использование
do_action_deprecated( $hook_name, $args, $version, $replacement, $message );
- $hook_name(строка) (обязательный)
- The name of the action hook.
- $args(массив) (обязательный)
- Array of additional function arguments to be passed to do_action().
- $version(строка) (обязательный)
- The version of WordPress that deprecated the hook.
- $replacement(строка)
- The hook that should have been used.
По умолчанию: '' - $message(строка)
- A message regarding the change.
По умолчанию: ''
Заметки
- Смотрите: _deprecated_hook()
Список изменений
С версии 4.6.0 | Введена. |
Код do_action_deprecated() do action deprecated WP 6.7.1
function do_action_deprecated( $hook_name, $args, $version, $replacement = '', $message = '' ) { if ( ! has_action( $hook_name ) ) { return; } _deprecated_hook( $hook_name, $version, $replacement, $message ); do_action_ref_array( $hook_name, $args ); }