[wp-trac] [WordPress Trac] #60575: Refactor: `data_wp_context` function does not follow WP standards.
WordPress Trac
noreply at wordpress.org
Tue Feb 27 10:43:13 UTC 2024
#60575: Refactor: `data_wp_context` function does not follow WP standards.
--------------------------------------+---------------------
Reporter: cbravobernal | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.5
Component: Editor | Version: trunk
Severity: normal | Resolution:
Keywords: needs-patch dev-feedback | Focuses:
--------------------------------------+---------------------
Comment (by swissspidy):
The current function is not great for developer experience. Again:
* The name is not consistent with other functions related to the
Interactivity API nor with any other functions in core.
* Lack of precedence for similar helper functions in core that output such
a attr=value pair, thus lack of consistency with rest of core.
* And mainly, it's simply not clear what the function belongs to nor what
it does. Heck, it could even be mistaken as a data provider for unit
tests.
That's why this whole ticket was created in the first place.
If we keep `data_wp_context()` as-is, we're stuck with it forever. So
better to fix that now before publishing documentation and trying to
explain it to everyone.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60575#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list