-
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.
Update the
WP_Theme_JSON_Resolver_Gutenberg
class to be like the co…
…re one (#36974)
- Loading branch information
1 parent
69bf891
commit 1c30171
Showing
4 changed files
with
83 additions
and
60 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,39 @@ | ||
<?php | ||
/** | ||
* Function to register the Custom Post Type | ||
* to be used to store user's config. | ||
* | ||
* @package gutenberg | ||
*/ | ||
|
||
/** | ||
* Registers a Custom Post Type to store the user's origin config. | ||
* | ||
* This has been ported to src/wp-includes/post.php | ||
*/ | ||
function register_global_styles_custom_post_type() { | ||
$args = array( | ||
'label' => __( 'Global Styles', 'gutenberg' ), | ||
'description' => 'CPT to store user design tokens', | ||
'public' => false, | ||
'show_ui' => false, | ||
'show_in_rest' => false, | ||
'rewrite' => false, | ||
'capabilities' => array( | ||
'read' => 'edit_theme_options', | ||
'create_posts' => 'edit_theme_options', | ||
'edit_posts' => 'edit_theme_options', | ||
'edit_published_posts' => 'edit_theme_options', | ||
'delete_published_posts' => 'edit_theme_options', | ||
'edit_others_posts' => 'edit_theme_options', | ||
'delete_others_posts' => 'edit_theme_options', | ||
), | ||
'map_meta_cap' => true, | ||
'supports' => array( | ||
'title', | ||
'editor', | ||
'revisions', | ||
), | ||
); | ||
register_post_type( 'wp_global_styles', $args ); | ||
} |
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