Handle hook deprecation in the DevHub theme
|Reported by:||DrewAPicture||Owned by:||DrewAPicture|
In #core10441, the core team is working on adding proper hook deprecation in the form of two new functions: apply_filters_deprecated() and do_action_deprecated().
We'll obviously need to make some adjustments to the parser to properly route the new function calls, but we also might need to adjust some minor things in the DevHub theme, such as ensuring the deprecation callout box can handle a notice for hooks and corresponding replacement hook links.
Looks like we use link_internal_element() inside of get_deprecated() to handle linking replacements, so in the interest of simplicity, we might need to add an additional case for hooks referenced simply with 'hook_name'. This would be for the context of deprecated hook docs that look like this:
<?php /** * Some now-deprecated hook. * * @since 2.6.0 * @deprecated 4.6.0 Use 'replacement_hook' instead. * @see 'replacement_hook'
We may very well already be in the clear, but it doesn't hurt to have a tracking ticket here in case there's something we're missing.