[wp-trac] [WordPress Trac] #37748: Dynamic Hooks Naming Convention
WordPress Trac
noreply at wordpress.org
Sun Aug 21 00:20:43 UTC 2016
#37748: Dynamic Hooks Naming Convention
-------------------------+--------------------------------
Reporter: ramiy | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: General | Version:
Severity: normal | Resolution: wontfix
Keywords: | Focuses: docs, performance
-------------------------+--------------------------------
Comment (by ramiy):
@peterwilsoncc Not sure why you closed the ticket - '''the hook name is
not changing'''.
Currently, hooks that use `'wp_hook_' . $dynamic_field . '_name'`
structure are already presented as `"wp_hook_{$dynamic_field}_name"` in
the [https://developer.wordpress.org/reference/ code reference].
The change won't affect the history. And won't affect the search in the
code reference. the [https://github.com/WordPress/phpdoc-parser WordPress-
phpDoc-Parse] has a very smart script, it converts dynamic hooks
artificially (see [https://core.trac.wordpress.org/browser/tags/4.6/src
/wp-admin/edit-form-advanced.php#L334 this hook] in
[https://developer.wordpress.org/reference/hooks/add_meta_boxes_post_type/
code reference]). Applying the patch won't affect the code reference and
the search.
Besides, it has performance benefits and it sets a new conventions. Those
are good things.
Can we at least discuss about the proposal before closing the ticket? I
will love to hear @DrewAPicture opinion, and the docs team, about the
change.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37748#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list