-
Notifications
You must be signed in to change notification settings - Fork 0
/
ctl-header-nav-sub.php
86 lines (72 loc) · 3.06 KB
/
ctl-header-nav-sub.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
/////////////////////////////////////////
/* Customize Appearance Options header */
/////////////////////////////////////////
function header_menu_sub( $wp_customize ) {
/* Create section */
$wp_customize->add_section('header_menu_sub', array(
'title' => __('Header - Sub-Menu (incomplete)', 'qbytesworld_WordPress'),
'priority' => 163,
));
/* ************************************************************ */
/* ************************************************************ */
/* ************************************************************ */
// Add checkbox to hide title & tagline
$wp_customize->add_setting( 'header_menu_sub_sub_checkbox', array(
'default' => false,
'transport' => 'refresh',
) );
$wp_customize->add_control( 'header_menu_sub_sub_checkbox', array(
'label' => __( 'Hide Title & Tagline', 'qbytesworld_WordPress' ),
'section' => 'header_menu_sub',
'settings' => 'header_menu_sub_checkbox',
'description' => __( 'True/False', 'qbytesworld_WordPress' ),
'type' => 'checkbox',
) );
/* Button color */
$wp_customize->add_setting('header_menu_sub_color', array(
'default' => '#004C87',
'sanitize_callback' => 'sanitize_hex_color',
'transport' => 'refresh',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_menu_sub_color_control', array(
'label' => __('Button Color', 'qbytesworld_WordPress'),
'section' => 'header_menu_sub',
'settings' => 'header_menu_sub_color',
'description'=> __( 'Color for Menu Item', 'qbytesworld_WordPress' ),
) ) );
/* Button hover color */
$wp_customize->add_setting('header_menu_sub_color_hover', array(
'default' => '#004C87',
'sanitize_callback' => 'sanitize_hex_color',
'transport' => 'refresh',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_menu_sub_color_hover_control', array(
'label' => __('Button Hover Color', 'qbytesworld_WordPress'),
'section' => 'header_menu_sub',
'settings' => 'header_menu_sub_color_hover',
'description'=> __( 'Mouse Menu Item Hover color', 'qbytesworld_WordPress' ),
) ) );
/* Button hover color */
$wp_customize->add_setting('header_menu_sub_color_active', array(
'default' => '#004C87',
'sanitize_callback' => 'sanitize_hex_color',
'transport' => 'refresh',
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_menu_sub_color_active_control', array(
'label' => __('Button Active Color', 'qbytesworld_WordPress'),
'section' => 'header_menu_sub',
'settings' => 'header_menu_sub_color_active',
'description'=> __( 'Active Menu Item color', 'qbytesworld_WordPress' ),
) ) );
}
add_action('customize_register', 'header_menu_sub');
///////////////////////////////////////////////
/* Output Customize CSS to support controls */
///////////////////////////////////////////////
function header_menu_sub_css() { ?>
<style type="text/css">
</style>
<?php }
add_action('wp_head', 'header_menu_sub_css');
?>