-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
33 lines (30 loc) · 811 Bytes
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* The Kandinsky Child Theme Functions
*
* @package Kandinsky
*/
/**
* Wp Enqueue Styles
*/
function knd_child_enqueue_styles() {
$version = date( 'Y.m.d-H:i:s', filemtime( get_stylesheet_directory() .'/style.css' ) );
wp_enqueue_style( 'knd-child', get_stylesheet_directory_uri() . '/style.css', array( 'knd' ), $version );
}
add_action('wp_enqueue_scripts', 'knd_child_enqueue_styles' );
/**
* Copy All Parent Theme Options
*/
function knd_child_after_switch_theme() {
$prefix = 'theme_mods_';
$parent = $prefix . get_template();
$child = $prefix . get_stylesheet();
$options = get_option( $parent );
if ( $parent ) {
update_option( $child, $options );
}
}
add_action('after_switch_theme', 'knd_child_after_switch_theme');
/**
* Add your custom code below this comment.
*/