Skip to content

Commit cbc43ac

Browse files
committed
Restore method call
1 parent 296a778 commit cbc43ac

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

includes/create-theme/theme-styles.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,12 @@ public static function build_style_css( $theme ) {
110110
public static function clear_user_styles_customizations() {
111111
// Clear all values in the user theme.json
112112
$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();
113114
$update_request = new WP_REST_Request( 'PUT', '/wp/v2/global-styles/' );
114115
$update_request->set_param( 'id', $user_custom_post_type_id );
115116
$update_request->set_param( 'settings', array() );
116117
$update_request->set_param( 'styles', array() );
118+
$global_styles_controller->update_item( $update_request );
117119
delete_transient( 'global_styles' );
118120
delete_transient( 'global_styles_' . get_stylesheet() );
119121
delete_transient( 'gutenberg_global_styles' );

0 commit comments

Comments
 (0)