[wp-meta] [Making WordPress.org] #1730: Fix auto-linking of inline @see tags for dynamic hooks.
Making WordPress.org
noreply at wordpress.org
Tue May 24 20:51:14 UTC 2016
#1730: Fix auto-linking of inline @see tags for dynamic hooks.
-------------------------------------+-----------------
Reporter: coffee2code | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: developer.wordpress.org | Keywords:
-------------------------------------+-----------------
As spotted by @DrewAPicture, dynamic hooks referenced via inline`@see`
tags are not linked properly.
For example:
https://developer.wordpress.org/reference/functions/get_page_template/
contains a generated URL for the `$type_template` dynamic hook of:
`https://developer.wordpress.org/reference/functions/‘$type_template’`
The URL should be:
`https://developer.wordpress.org/reference/hooks/type_template/`
The issue stems from the presence of the `$` in dynamic hooks, which
causes the current `link_internal_element()` regex for hooks to fail,
leading to the fallback conditional block (which is meant to handle
functions) to be executed. This is the reason the bad URL is pointing to
`/functions/` and not `/hooks/`.
And, obviously, the proper link should also be sanitized to remove the
`$`, `‘`, and `’`.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/1730>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list