File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -110,10 +110,12 @@ public static function build_style_css( $theme ) {
110
110
public static function clear_user_styles_customizations () {
111
111
// Clear all values in the user theme.json
112
112
$ user_custom_post_type_id = WP_Theme_JSON_Resolver::get_user_global_styles_post_id ();
113
+ $ global_styles_controller = new WP_REST_Global_Styles_Controller ();
113
114
$ update_request = new WP_REST_Request ( 'PUT ' , '/wp/v2/global-styles/ ' );
114
115
$ update_request ->set_param ( 'id ' , $ user_custom_post_type_id );
115
116
$ update_request ->set_param ( 'settings ' , array () );
116
117
$ update_request ->set_param ( 'styles ' , array () );
118
+ $ global_styles_controller ->update_item ( $ update_request );
117
119
delete_transient ( 'global_styles ' );
118
120
delete_transient ( 'global_styles_ ' . get_stylesheet () );
119
121
delete_transient ( 'gutenberg_global_styles ' );
You can’t perform that action at this time.
0 commit comments