-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add register_theme_feature call to ensure the feature is registered s…
…o it appears in API responses
- Loading branch information
1 parent
0bef544
commit d77120e
Showing
3 changed files
with
48 additions
and
14 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/** | ||
* Temporary compatibility shims for features present in Gutenberg. | ||
* This file should be removed when WordPress 6.1.0 becomes the lowest | ||
* supported version by this plugin. | ||
* | ||
* @package gutenberg | ||
*/ | ||
|
||
/** | ||
* This function runs in addition to the core `create_initial_theme_features`. | ||
* The 6.1 release needs to update the core function to include the body of this function. | ||
* | ||
* Creates the initial theme features when the 'setup_theme' action is fired. | ||
* | ||
* See {@see 'setup_theme'}. | ||
* | ||
* @since 5.5.0 | ||
* @since 6.0.1 The `block-templates` feature was added. | ||
* @since 6.1.0 The `disable-layout-styles` feature was added. | ||
*/ | ||
function gutenberg_create_initial_theme_features() { | ||
register_theme_feature( | ||
'disable-layout-styles', | ||
array( | ||
'description' => __( 'Whether the theme disables generated layout styles.', 'gutenberg' ), | ||
'show_in_rest' => true, | ||
) | ||
); | ||
} | ||
add_action( 'setup_theme', 'gutenberg_create_initial_theme_features', 0 ); |
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