Passed
Pull Request — master (#203)
by Virginia
03:13
created

theme-support.php ➔ theme_support()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 29

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 29
rs 9.456
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Enqueue theme CSS and JavaScript .
5
 */
6
if ( ! function_exists( 'theme_support' ) ) :
7
	function theme_support() {
8
		// Add support for full and wide align images.
9
		add_theme_support( 'align-wide' );
10
		// Add support for styling blocks.
11
		add_theme_support( 'wp-block-styles' );
12
		// Add support for custom color scheme.
13
		add_theme_support( 'editor-color-palette', array(
14
			array(
15
				'name'  => __( 'Strong Blue', 'lsx' ),
16
				'slug'  => 'strong-blue',
17
				'color' => '#27639e',
18
			),
19
			array(
20
				'name'  => __( 'Lighter Blue', 'lsx' ),
21
				'slug'  => 'lighter-blue',
22
				'color' => '#428bca',
23
			),
24
			array(
25
				'name'  => __( 'Yellow', 'lsx' ),
26
				'slug'  => 'light-yellow',
27
				'color' => '#f7ae00',
28
			),
29
			array(
30
				'name'  => __( 'Dark Yellow', 'lsx' ),
31
				'slug'  => 'dark-yellow',
32
				'color' => '#ab7800',
33
			),
34
		) );
35
	}
36
endif;
37
add_action( 'after_setup_theme', 'theme_support' );
38
39