-
Notifications
You must be signed in to change notification settings - Fork 0
/
customizer.php
132 lines (111 loc) · 4.36 KB
/
customizer.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
/* Customizer Register */
function massively_customizer_register( $wp_customize ) {
// =============================
// = Theme Options Panel =
// =============================
$wp_customize->add_panel( 'theme_settings', array(
'title' => __( 'Theme Options', 'massively' ),
'description' => '', // Include html tags such as <p>
'priority' => 10, // Mixed with top-level-section hierarchy.
) );
/*-----------------------------*/
/* Header Options */
/*-----------------------------*/
$wp_customize->add_section( 'massively_header_options', array(
'title' => __( 'Header Options', 'massively' ),
'description' => __( '<i>Custom <b>Title</b> and <b>Description</b> text is show only on home page, Do not show on other pages and you can use html tag for your required.</i>', 'massively' ),
'priority' => 10,
'panel' => 'theme_settings'
) );
/* Custom title */
$wp_customize->add_setting( 'header_custom_title', array(
'default' => '',
'transport' => 'refresh'
) );
$wp_customize->add_control( 'header_custom_title', array(
'label' => __( 'Custom Title', 'massively' ),
// 'description' => __( 'Custom title text show only on home page, no other page. You can use html tag for your required ', 'massively' ),
'section' => 'massively_header_options',
'type' => 'text'
) );
/* Custom title */
$wp_customize->add_setting( 'header_custom_description', array(
'default' => '',
'transport' => 'refresh'
) );
$wp_customize->add_control( 'header_custom_description', array(
'label' => __( 'Custom Description', 'massively' ),
'section' => 'massively_header_options',
'type' => 'textarea'
) );
/*-----------------------------*/
/* Social Options */
/*-----------------------------*/
$wp_customize->add_section( 'massively_social_network', array(
'title' => __( 'Social Network', 'massively' ),
'description' => __( '<i>You can add your social network link without http://</i>', 'massively' ),
'priority' => 20,
'panel' => 'theme_settings'
) );
/* Facebook link option */
$wp_customize->add_setting( 'massively_fb_text', array(
'default' => '',
'transport' => 'refresh'
) );
$wp_customize->add_control( 'massively_fb_text', array(
'label' => __( 'Facebook Link', 'massively' ),
'section' => 'massively_social_network',
'type' => 'text'
) );
/* Twitter link Option */
$wp_customize->add_setting( 'massively_twitter_text', array(
'default' => '',
'transport' => 'refresh'
) );
$wp_customize->add_control( 'massively_twitter_text', array(
'label' => __( 'Twitter Link', 'massively' ),
'section' => 'massively_social_network',
'type' => 'text'
) );
/* Instagram link Options */
$wp_customize->add_setting( 'massively_ins_text', array(
'default' => '',
'transport' => 'refresh'
) );
$wp_customize->add_control( 'massively_ins_text', array(
'label' => __( 'Instagram Link', 'massively' ),
'section' => 'massively_social_network',
'type' => 'text'
) );
/* GitHub link Options */
$wp_customize->add_setting( 'massively_git_text', array(
'default' => '',
'transport' => 'refresh'
) );
$wp_customize->add_control( 'massively_git_text', array(
'label' => __( 'GitHub Link', 'massively' ),
'section' => 'massively_social_network',
'type' => 'text'
) );
/*-----------------------------*/
/* Footer Options */
/*-----------------------------*/
$wp_customize->add_section( 'footer_settings', array(
'title' => __( 'Footer Options', 'massively' ),
'description' => __( '<i>You can use the list tag for divide the content.</i>', 'massively' ),
'priority' => 30,
'panel' => 'theme_settings'
) );
/* Footer Text Option */
$wp_customize->add_setting( 'footer_text_option', array(
'default' => '',
'transport' => 'refresh'
) );
$wp_customize->add_control( 'footer_text_option', array(
'label' => __( 'Footer Copyright Text', 'massively' ),
'section' => 'footer_settings',
'type' => 'textarea'
) );
}
add_action( 'customize_register', 'massively_customizer_register' );