forked from NB-Public/jkb-childtheme
57 lines
1.6 KiB
PHP
57 lines
1.6 KiB
PHP
<?php
|
|
|
|
// register and enqueue the stylesheet.
|
|
function jkb_register_child_theme_styles() {
|
|
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
|
|
wp_enqueue_style( 'child-theme-css', get_stylesheet_directory_uri() .'/style.css' , array('parent-style'));
|
|
}
|
|
add_action('wp_enqueue_scripts', 'register_child_theme_styles');
|
|
function register_child_theme_styles() {
|
|
wp_register_style('style', get_stylesheet_uri());
|
|
wp_enqueue_style('style');
|
|
}
|
|
|
|
add_action('login_enqueue_scripts', 'jkb_register_login_stylesheet');
|
|
function jkb_register_login_stylesheet() {
|
|
wp_enqueue_style('custom-login', get_stylesheet_directory_uri() . '/login.css' );
|
|
//wp_enqueue_script('custom-login', get_stylesheet_directory_uri() . '/login.js' );
|
|
}
|
|
|
|
function jkb_add_custom_gutenberg_color_palette() {
|
|
add_theme_support(
|
|
'editor-color-palette',
|
|
[
|
|
[
|
|
'name' => esc_html__( 'Schwarz', 'jkb' ),
|
|
'slug' => 'black',
|
|
'color' => '#000000',
|
|
],
|
|
[
|
|
'name' => esc_html__( 'Weiß', 'jkb' ),
|
|
'slug' => 'white',
|
|
'color' => '#ffffff',
|
|
],
|
|
[
|
|
'name' => esc_html__( 'Pistazie', 'jkb' ),
|
|
'slug' => 'pistachio',
|
|
'color' => '#a0c864',
|
|
],
|
|
[
|
|
'name' => esc_html__( 'Sonneblume', 'jkb' ),
|
|
'slug' => 'sunflower',
|
|
'color' => '#ffe100',
|
|
],
|
|
[
|
|
'name' => esc_html__( 'Moos', 'jkb' ),
|
|
'slug' => 'moss',
|
|
'color' => '#145f32',
|
|
],
|
|
[
|
|
'name' => esc_html__( 'Lachs', 'jkb' ),
|
|
'slug' => 'salmon',
|
|
'color' => '#f06464',
|
|
],
|
|
]
|
|
);
|
|
}
|
|
add_action( 'after_setup_theme', 'jkb_add_custom_gutenberg_color_palette' );
|