[wp-trac] [WordPress Trac] #59383: Blocks: Introduce helper function to retrieve hooked blocks
WordPress Trac
noreply at wordpress.org
Mon Sep 25 18:43:20 UTC 2023
#59383: Blocks: Introduce helper function to retrieve hooked blocks
-------------------------------------------------+-------------------------
Reporter: gziolo | Owner: gziolo
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.4
Component: Themes | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests 2nd- | Focuses:
opinion needs-dev-note |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):
* keywords: has-patch has-unit-tests => has-patch has-unit-tests 2nd-
opinion needs-dev-note
Comment:
Should this new utility function be `wp_` prefixed?
I realize the most of the other functions in the same file are not
prefixed. However, as this is a brand new Core function, prefixing could
avoid a name collision if a plugin, theme, or mu-use script has the same
function name.
What is the likelihood of another global function being named the same?
- A search of [https://wpdirectory.net/search/01HB6SGE4TP6ATX1MTE85R4MFH
plugins] and [https://wpdirectory.net/search/01HB6T7ARKQDTHTP0HN55H4B39
themes] on wp.org did not reveal any instances.
- A [https://github.com/search?q=get_hooked_blocks&type=code search of
GitHub] did not find any instances other than WordPress.
That's good. It's still possible in the wild for things not hosted in
either of these mediums.
Thoughts? I'll mark this with `2nd-opinion` to open the discussion.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59383#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list