-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcustomizer.php
80 lines (76 loc) · 1.87 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
<?php
add_action( 'customize_register', 'bwsocial_customize_register', 10, 1 );
function bwsocial_customize_register( $wp_customize ) {
$wp_customize->add_section(
'bw-social',
array(
'title' => __( 'Social', 'bigwing-social' )
)
);
// Icon Size
$wp_customize->add_setting(
'bw_social[icon_size]',
array(
'type' => 'option',
'default' => '24'
)
);
$wp_customize->add_control( new WP_Customize_Control(
$wp_customize,
'bw_social[icon_size]',
array(
'label' => __( 'Icon Size', 'bigwing-social' ),
'section' => 'bw-social',
'setting' => 'bw_social[icon_size]',
'type' => 'select',
'choices' => array(
'18' => '18px',
'24' => '24px',
'36' => '36px',
'48' => '48px'
),
)
) );
// Fill Color
$wp_customize->add_setting(
'bw_social[fill_color]',
array(
'type' => 'option',
'default' => 'gray'
)
);
$wp_customize->add_control( new WP_Customize_Control(
$wp_customize,
'bw_social[fill_color]',
array(
'label' => __( 'Fill Color', 'bigwing-social' ),
'section' => 'bw-social',
'setting' => 'bw_social[fill_color]',
'type' => 'select',
'choices' => array(
'brand' => __( 'Brand Colors', 'bigwing-social' ),
'gray' => _x( 'Gray', 'color', 'bigwing-social' ),
'white' => _x( 'White', 'color', 'bigwing-social' ),
'black' => _x( 'Black', 'color', 'bigwing-social' ),
'custom' => __( 'Custom Color', 'bigwing-social' )
),
)
) );
// Fill Color Custom
$wp_customize->add_setting(
'bw_social[fill_color_custom]',
array(
'type' => 'option',
'default' => '#767676'
)
);
$wp_customize->add_control( new WP_Customize_Color_Control(
$wp_customize,
'bw_social[fill_color_custom]',
array(
'label' => __( 'Fill Color Custom', 'bigwing-social' ),
'section' => 'bw-social',
'setting' => 'bw_social[fill_color_custom]',
)
) );
}