do_action_deprecated()WP 4.6.0

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.
The hook that should have been used.
По умолчанию: ''
A message regarding the change.
По умолчанию: ''


Список изменений

С версии 4.6.0 Введена.

Код do_action_deprecated() WP 6.5.3

function do_action_deprecated( $hook_name, $args, $version, $replacement = '', $message = '' ) {
	if ( ! has_action( $hook_name ) ) {

	_deprecated_hook( $hook_name, $version, $replacement, $message );

	do_action_ref_array( $hook_name, $args );