diff --git a/lib/rest-api.php b/lib/rest-api.php index f1336d86b33a47..e05b1b8941e70e 100644 --- a/lib/rest-api.php +++ b/lib/rest-api.php @@ -206,7 +206,9 @@ function gutenberg_auto_draft_get_sample_permalink( $permalink, $id, $title, $na 'schema' => array( 'type' => 'object', 'properties' => array( - 'custom_logo' => array( 'type' => 'integer' ), + 'custom_logo' => array( + 'type' => array( 'integer', 'boolean' ), + ), ), ), ), @@ -243,6 +245,7 @@ function gutenberg_rest_pre_get_setting_filter_custom_logo( $result, $name ) { 'custom_logo' => get_theme_mod( 'custom_logo' ), ); } + return $result; } add_filter( 'rest_pre_get_setting', 'gutenberg_rest_pre_get_setting_filter_custom_logo', 10, 2 ); @@ -267,6 +270,7 @@ function gutenberg_rest_pre_set_setting_filter_theme_mods( $result, $name, $valu update_option( $theme_mods_setting_name, $value ); return true; } + return $result; } add_filter( 'rest_pre_update_setting', 'gutenberg_rest_pre_set_setting_filter_theme_mods', 10, 3 );