Skip to content

Commit

Permalink
Remove use of current()
Browse files Browse the repository at this point in the history
  • Loading branch information
noisysocks committed May 24, 2019
1 parent bb20459 commit 0e854bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/widgets-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ function gutenberg_widgets_init( $hook ) {
$max_upload_size = 0;
}

$color_palette = current( (array) get_theme_support( 'editor-color-palette' ) );
$font_sizes = current( (array) get_theme_support( 'editor-font-sizes' ) );

$settings = array_merge(
array(
'disableCustomColors' => get_theme_support( 'disable-custom-colors' ),
Expand All @@ -47,6 +44,9 @@ function gutenberg_widgets_init( $hook ) {
gutenberg_get_legacy_widget_settings()
);

list( $color_palette, ) = (array) get_theme_support( 'editor-color-palette' );
list( $font_sizes, ) = (array) get_theme_support( 'editor-font-sizes' );

if ( false !== $color_palette ) {
$settings['colors'] = $color_palette;
}
Expand Down

0 comments on commit 0e854bb

Please sign in to comment.