Fires functions attached to a deprecated filter hook.
Description
When a filter hook is deprecated, the apply_filters() call is replaced with apply_filters_deprecated(), which triggers a deprecation notice and then fires the original filter hook. Note: the value and extra arguments passed to the original apply_filters() call must be passed here to $args as an array. For example: // Old filter.
return apply_filters( 'wpdocs_filter', $value, $extra_arg );
// Deprecated.
return apply_filters_deprecated( 'wpdocs_filter', array( $value, $extra_arg ), '4.9.0', 'wpdocs_new_filter' );
Parameters
$hook_namestring
The name of the filter hook.
$argsarray
Array of additional function arguments to be passed to apply_filters().
$versionstring
The version of WordPress that deprecated the hook.
$replacementstringoptional
The hook that should have been used. Default empty.Default: ''
$messagestringoptional
A message regarding the change. Default empty.Default: ''
Return
mixed
The filtered value after all hooked functions are applied to it.
Hooks fired · 1
One hook fires while apply_filters_deprecated() runs, in this order:
block_editor_rest_api_preload()Preloads common data used with the block editor by specifying an array of REST API paths that will be preloaded for a given block editor context.
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 6.9.7 tag, from src/wp-includes/plugin.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.