[wp-meta] [Making WordPress.org] #1766: Handle hook deprecation in the DevHub theme

Making WordPress.org noreply at wordpress.org
Sat Jun 11 19:21:35 UTC 2016


#1766: Handle hook deprecation in the DevHub theme
---------------------------+---------------------------
 Reporter:  DrewAPicture   |       Owner:  DrewAPicture
     Type:  enhancement    |      Status:  accepted
 Priority:  normal         |   Milestone:
Component:  Developer Hub  |  Resolution:
 Keywords:                 |
---------------------------+---------------------------
Changes (by DrewAPicture):

 * owner:   => DrewAPicture
 * status:  new => accepted


Comment:

 [attachment:1766.diff] adds some handling for a few things:

 * A new string label for archive results: "Action Hook (deprecated)" or
 "Filter Hook (deprecated)". Since we have the opportunity to indicate
 deprecated status in the archive view, we should take it. Nothing worse
 than clicking through to what you think is a legit hook only to discover
 it's deprecated. I feel like we should do this for other stuff too, but
 that's another ticket :-)

 * Adds an optional parameter to `link_internal_element()` that allows us
 to ''selectively'' `preg_match()` against arbitrary content for a hook
 reference in the form of 'hook_name'. Currently it only handles inline
 `@see` references, e.g. `{@see 'hook_name'}` which come through encoded as
 `‘hook_name’` This is important for handling linking for the
 deprecated notice, so if we do `@see 'hook_name'` as top-level DocBlock
 tag, it's still possible to parse that as a linkable hook instead of just
 a string.

 * Leverages two new hook types that will have to be implemented at the
 parser level: 'action_deprecated' and 'filter_deprecated' to make much of
 the above possible

 * Display deprecated hooks with `apply_filters_deprecrated` or
 `do_action_deprecated` in the reference single page

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/1766#comment:1>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list