Making WordPress.org


Ignore:
Timestamp:
07/27/2018 04:08:29 AM (6 years ago)
Author:
obenland
Message:

Gutenberg: Update theme support calls

See https://wordpress.org/gutenberg/handbook/extensibility/theme-support/

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/functions.php

    r7505 r7507  
    1818    }
    1919
    20     add_theme_support( 'align-wide' );
    2120    show_admin_bar( true );
    2221
     
    160159        ) );
    161160
    162         add_theme_support( 'gutenberg', array(
    163             'wide-images' => true,
    164         'colors' => array(
    165                 '#0073aa',
    166                 '#229fd8',
    167                 '#eee',
    168                 '#444',
    169             ),
    170         ) );
     161        add_theme_support( 'align-wide' );
     162
     163        add_theme_support( 'editor-color-palette', [
     164            [
     165                'name'  => esc_html__( 'Dark Blue', 'gutenbergtheme' ),
     166                'slug' => 'dark-blue',
     167                'color' => '#0073aa',
     168            ],
     169            [
     170
     171                'name'  => esc_html__( 'Light Blue', 'gutenbergtheme' ),
     172                'slug' => 'light-blue',
     173                'color' => '#229fd8',
     174            ],
     175            [
     176
     177                'name'  => esc_html__( 'Dark Gray', 'gutenbergtheme' ),
     178                'slug' => 'dark-gray',
     179                'color' => '#444',
     180            ],
     181            [
     182
     183                'name'  => esc_html__( 'Light Gray', 'gutenbergtheme' ),
     184                'slug' => 'light-gray',
     185                'color' => '#eee',
     186            ],
     187        ] );
    171188    }
    172189endif;
Note: See TracChangeset for help on using the changeset viewer.