Vordefinierte Farben
Du möchtest eine Farbpalette für dein Theme vorgeben? Dann kannst du dies mit dieser PHP Funktion tun:
1
function prwp_setup_theme_supported_features() {
2
add_theme_support( 'editor-color-palette', array(
3
array(
4
'name' => __( 'strong magenta', 'themeLangDomain' ),
5
'slug' => 'strong-magenta',
6
'color' => '#a156b4',
7
),
8
array(
9
'name' => __( 'light grayish magenta', 'themeLangDomain' ),
10
'slug' => 'light-grayish-magenta',
11
'color' => '#d0a5db',
12
),
13
array(
14
'name' => __( 'very light gray', 'themeLangDomain' ),
15
'slug' => 'very-light-gray',
16
'color' => '#eee',
17
),
18
array(
19
'name' => __( 'very dark gray', 'themeLangDomain' ),
20
'slug' => 'very-dark-gray',
21
'color' => '#444',
22
),
23
) );
24
}
25
add_action( 'after_setup_theme', 'prwp_setup_theme_supported_features' );
Copied!
Last modified 2yr ago
Export as PDF
Copy link