Skip to content

Commit

Permalink
Normalize Theme: Remove theme supports instead of overwriting them.
Browse files Browse the repository at this point in the history
  • Loading branch information
epiqueras committed Dec 3, 2019
1 parent d0e896e commit f561445
Showing 1 changed file with 2 additions and 60 deletions.
62 changes: 2 additions & 60 deletions packages/e2e-tests/mu-plugins/normalize-theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,65 +12,7 @@
* are consistent across different themes.
*/
function normalize_theme_init() {
add_theme_support(
'editor-color-palette',
array(
array(
'name' => __( 'Accent Color', 'gutenberg' ),
'slug' => 'accent',
'color' => '#cd2653',
),
array(
'name' => __( 'Primary', 'gutenberg' ),
'slug' => 'primary',
'color' => '#0073a8',
),
array(
'name' => __( 'Secondary', 'gutenberg' ),
'slug' => 'secondary',
'color' => '#005075',
),
array(
'name' => __( 'Subtle Background', 'gutenberg' ),
'slug' => 'subtle-background',
'color' => '#dcd7ca',
),
array(
'name' => __( 'Background Color', 'gutenberg' ),
'slug' => 'background',
'color' => '#' . 'f5efe0',
),
)
);

add_theme_support(
'editor-font-sizes',
array(
array(
'name' => _x( 'Small', 'Name of the small font size in the block editor', 'gutenberg' ),
'shortName' => _x( 'S', 'Short name of the small font size in the block editor.', 'gutenberg' ),
'size' => 18,
'slug' => 'small',
),
array(
'name' => _x( 'Regular', 'Name of the regular font size in the block editor', 'gutenberg' ),
'shortName' => _x( 'M', 'Short name of the regular font size in the block editor.', 'gutenberg' ),
'size' => 21,
'slug' => 'normal',
),
array(
'name' => _x( 'Large', 'Name of the large font size in the block editor', 'gutenberg' ),
'shortName' => _x( 'L', 'Short name of the large font size in the block editor.', 'gutenberg' ),
'size' => 26.25,
'slug' => 'large',
),
array(
'name' => _x( 'Larger', 'Name of the larger font size in the block editor', 'gutenberg' ),
'shortName' => _x( 'XL', 'Short name of the larger font size in the block editor.', 'gutenberg' ),
'size' => 32,
'slug' => 'larger',
),
)
);
remove_theme_support( 'editor-color-palette' );
remove_theme_support( 'editor-font-sizes' );
}
add_action( 'init', 'normalize_theme_init' );

0 comments on commit f561445

Please sign in to comment.