-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Global Styles code to continue adding settings & styles (#38883)
* New settings (works in WordPress 5.9) Rename wp_get_global_settings to gutenberg_get_global_settings. In WordPress 5.9 the wp_* function is already defined, so we can't override them. It's calling the existing WP_Theme_JSON classes in WordPress core so it won't pick up the plugin modification. In the plugin, to make sure these changes work fine in 5.9 as well, we need to use the gutenberg_* function instead. * New styles (works in WordPress 5.9) * Fix for WordPress 5.9: gutenberg_get_global_stylesheet should call the Gutenberg classes * Move functions to the compat/6.0 folder While this PR does not do any behavioral change, we still need to call the plugin classes when the the minimum plugin version is 5.9 (at which point, the compat/5.9 is removed). * Use the plugin classes in the REST endpoint The endpoint landed in WordPress 5.9, so we need to make sure even in this environment, the plugin will call the WP_Theme_JSON_* classes.
- Loading branch information
Showing
8 changed files
with
333 additions
and
208 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
194 changes: 0 additions & 194 deletions
194
lib/compat/wordpress-5.9/get-global-styles-and-settings.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.