[wp-meta] [Making WordPress.org] #2880: Regex for @see linking of hooks recognize hook names contain variables

Making WordPress.org noreply at wordpress.org
Thu Jun 15 22:46:38 UTC 2017


#2880: Regex for @see linking of hooks recognize hook names contain variables
---------------------------+-----------------
 Reporter:  coffee2code    |      Owner:
     Type:  defect         |     Status:  new
 Priority:  normal         |  Milestone:
Component:  Developer Hub  |   Keywords:
---------------------------+-----------------
 For example, in the description for
 [https://developer.wordpress.org/reference/functions/wp_transition_comment_status/
 wp_transition_comment_status()] there is a reference to a hook that looks
 like this:

 `{@see 'comment_$new_status_$comment->comment_type'}`

 However, it fails to be recognized as a hook due to the presence of `&`
 and `;` (that were introduced by the encoding of `>` to `>`) and the
 `-` that the regex in `link_internal_element()` doesn't expect. Thus, the
 resulting link is the fallback assumption that the reference is to a
 function.

 ''(Note that as of this posting there is an unrelated bug that also
 affects the aforemention link, which will be addressed in #2881.)''

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/2880>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list