WordPress at a glance
function is not described

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.

Hooks from the function

null. Nothing.


do_action_deprecated( $tag, $args, $version, $replacement, $message );
$tag(string) (required)
The name of the action hook.
$args(array) (required)
Array of additional function arguments to be passed to do_action().
$version(string) (required)
The version of WordPress that deprecated the hook.
The hook that should have been used.
Default: ''
A message regarding the change.
Default: ''


  • See: _deprecated_hook()


Since 4.6.0 Introduced.

Code of do_action_deprecated() WP 5.7.1

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

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

	do_action_ref_array( $tag, $args );