Opened 9 years ago
Closed 9 years ago
#1730 closed defect (bug) (fixed)
Fix auto-linking of inline @see tags for dynamic hooks.
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Developer Hub | Keywords: | |
Cc: |
Description
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 ’
.
In 3233: