Skip to content

Commit

Permalink
Some minor tweaks from the following Gutenberg PRs:
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Sep 6, 2023
1 parent 3384a80 commit a29034a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,8 @@ public function get_theme_items_permissions_check( $request ) { // phpcs:ignore
* Returns the given theme global styles variations.
*
* @since 6.0.0
* @since 6.2.0 Returns parent theme variations, if they exist.
* @since 6.4.0 Removed unnecessary local variable.
*
* @param WP_REST_Request $request The request instance.
*
Expand All @@ -679,9 +681,8 @@ public function get_theme_items( $request ) {
}

$variations = WP_Theme_JSON_Resolver::get_style_variations();
$response = rest_ensure_response( $variations );

return $response;
return rest_ensure_response( $variations );
}

/**
Expand All @@ -690,11 +691,12 @@ public function get_theme_items( $request ) {
* Currently just checks for invalid markup.
*
* @since 6.2.0
* @since 6.4.0 Changed method visibility to protected.
*
* @param string $css CSS to validate.
* @return true|WP_Error True if the input was validated, otherwise WP_Error.
*/
private function validate_custom_css( $css ) {
protected function validate_custom_css( $css ) {
if ( preg_match( '#</?\w+#', $css ) ) {
return new WP_Error(
'rest_custom_css_illegal_markup',
Expand Down

0 comments on commit a29034a

Please sign in to comment.