Skip to content

Commit

Permalink
Theme.json styles check: port changes from core to Gutenberg (#38888)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras authored Feb 17, 2022
1 parent 2df751a commit 7fc0147
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,10 @@ public function get_theme_item( $request ) {
}

if ( rest_is_field_included( 'styles', $fields ) ) {
$raw_data = $theme->get_raw_data();
$data['styles'] = isset( $raw_data['styles'] ) ? $raw_data['styles'] : array();
$raw_data = $theme->get_raw_data();
if ( isset( $raw_data['styles'] ) ) {
$data['styles'] = $raw_data['styles'];
}
}

$context = ! empty( $request['context'] ) ? $request['context'] : 'view';
Expand Down

0 comments on commit 7fc0147

Please sign in to comment.