-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
46 lines (43 loc) · 1.41 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/**
* Ekiline functions and definitions.
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package ekiline
*/
/**
* Estilos CSS y Javascript
* Incorporar desde el tema padre Ekiline, manteniendo el orden.
*
* @link https://developer.wordpress.org/themes/advanced-topics/child-themes/#3-enqueue-stylesheet
*/
function ekiline_child_scripts() {
wp_enqueue_style( 'parent-ekiline', get_template_directory_uri() . '/style.css', array('bootstrap-style'), '5', 'all' );
wp_enqueue_style( 'ekiline-style', get_stylesheet_uri(), array('parent-ekiline'), '5', 'all' );
}
add_action( 'wp_enqueue_scripts', 'ekiline_child_scripts', 1 );
/**
* UTILIDADES:
* Ver estilos durante la edición, manteniendo el orden heredado de padre.
*
* @link https://developer.wordpress.org/themes/advanced-topics/child-themes/
*/
function ekiline_child_block_editor_setup() {
add_theme_support( 'editor-styles' );
$block_styles = array(
'style.css',
);
add_editor_style( $block_styles );
}
add_action( 'after_setup_theme', 'ekiline_child_block_editor_setup', 100 );
/**
* Inicializar nueva combinacion de parametros en customizer.
*
* @link https://developer.wordpress.org/reference/functions/set_theme_mod/
*/
function ekiline_child_theme_mods() {
set_theme_mod( 'ekiline_range_header', '60' );
set_theme_mod( 'ekiline_inversemenu', true );
}
add_action( 'after_switch_theme', 'ekiline_child_theme_mods' );