Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed May 21, 2021
1 parent 6dbd06a commit ada8bc2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ),
),
),
),
),
Expand Down Expand Up @@ -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 );

Expand All @@ -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 );

0 comments on commit ada8bc2

Please sign in to comment.