From e6dc372b16da6d410ad806cef5d34a961f8a8b4c Mon Sep 17 00:00:00 2001 From: Ari Stathopoulos Date: Fri, 21 May 2021 15:18:10 +0300 Subject: [PATCH] fixes https://github.com/bobbingwide/thisis/issues/32 --- lib/rest-api.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/rest-api.php b/lib/rest-api.php index 5cdc258c08d5a..6817aba686c53 100644 --- a/lib/rest-api.php +++ b/lib/rest-api.php @@ -197,7 +197,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' ), + ), ), ), ), @@ -234,6 +236,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 ); @@ -258,6 +261,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 );