This can be used to remove default functions attached to a specific filter hook and possibly replace them with a substitute. To remove a hook, the $callback and $priority arguments must match when the hook was added. This goes for both filters and actions. No warning will be given on removal failure.
Parameters
$hook_namestring
The filter hook to which the function to be removed is hooked.
$callbackcallable|string|array
The callback to be removed from running when the filter is applied. This function can be called unconditionally to speculatively remove a callback that may or may not exist.
$priorityintoptional
The exact priority used when adding the original filter callback. Default 10.Default: 10
Return
bool
Whether the function existed before it was removed.
_restore_wpautop_hook()If do_blocks() needs to remove wpautop() from the `the_content` filter, this re-adds it afterwards, for subsequent `the_content` usage.
_wp_post_thumbnail_class_filter_remove()Removes the '_wp_post_thumbnail_class_filter' callback from the 'wp_get_attachment_image_attributes' filter hook. Internal use only.
_wp_post_thumbnail_context_filter_remove()Removes the '_wp_post_thumbnail_context_filter' callback from the 'wp_get_attachment_image_context' filter hook. Internal use only.
block_core_query_disable_enhanced_pagination()Traverse the tree of blocks looking for any plugin block (i.e., a block from an installed plugin) inside a Query block with the enhanced pagination enabled. If at least one is found, the enhanced pagination is effectively disabled to prevent any potential incompatibilities.
do_blocks()Parses dynamic blocks out of `post_content` and re-renders them.
do_shortcode()Searches content for shortcodes and filter shortcodes through their hooks.
render_block_core_image()Renders the `core/image` block on the server, adding a data-id attribute to the element if core/gallery has added on pre-render.
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.