[wp-trac] [WordPress Trac] #54517: The naming of some of the WP_Theme_JSON_Resolver's methods is not optimal
WordPress Trac
noreply at wordpress.org
Sat Dec 4 16:17:14 UTC 2021
#54517: The naming of some of the WP_Theme_JSON_Resolver's methods is not optimal
-------------------------------------+----------------------------
Reporter: antonvlasenko | Owner: antonvlasenko
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.9
Component: Themes | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch needs-refresh | Focuses: rest-api
-------------------------------------+----------------------------
Comment (by SergeyBiryukov):
Replying to [comment:7 hellofromTonya]:
> It's okay to discuss it now as once 5.9 final is released, the name has
be maintained for backwards-compatibility.
Just noting that it looks like the block editor might have a different
approach to backward compatibility than the rest of core. For example, in
[52049]:
* The `WP_Theme_JSON::get_merged_preset_by_slug()` and
`::has_properties()` methods have been completely removed.
* The `WP_Theme_JSON::get_block_styles()` method was renamed.
* The parameters of `WP_Theme_JSON::get_merged_data()` and
`::get_stylesheet()` methods have been completely changed, though
`_deprecated_argument()` calls were added to handle the older format.
* The `WP_Theme_JSON::ALLOWED_TOP_LEVEL_KEYS`, `::ALLOWED_SETTINGS`, and
`::ALLOWED_STYLES` constants were renamed.
So it looks like it could still be an option to rename some methods at a
later stage, though I agree it would be preferable to do that now if there
is enough consensus.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54517#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list