Skip to content

Commit 284cf55

Browse files
author
Brylie Christopher Oxley
committed
Lint
1 parent f1b00d6 commit 284cf55

1 file changed

Lines changed: 62 additions & 59 deletions

File tree

inc/theme-customizer.php

Lines changed: 62 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,102 @@
11
<?php
22

3-
function cc_base_theme_customize_register( $wp_customize ) {
4-
register_featured_content_settings( $wp_customize );
5-
register_display_settings( $wp_customize );
3+
function cc_base_theme_customize_register($wp_customize)
4+
{
5+
register_featured_content_settings($wp_customize);
6+
register_display_settings($wp_customize);
67
}
78

8-
function register_display_settings( $wp_customize ) {
9-
$wp_customize->add_section(
9+
function register_display_settings($wp_customize)
10+
{
11+
$wp_customize->add_section(
1012
'cc_base_display_settings_section',
1113
array(
12-
'title' => __( 'Display Settings', 'cc_base_theme_settings' ),
14+
'title' => __('Display Settings', 'cc_base_theme_settings'),
1315
'priority' => 500,
1416
'capability' => 'edit_theme_options',
1517
)
1618
);
1719

18-
$wp_customize->add_setting(
19-
'cc_base_include_donate',
20+
$wp_customize->add_setting(
21+
'cc_base_include_donate',
2022
array(
21-
'default' => True,
23+
'default' => true,
2224
'transport' => 'refresh',
2325
'capability' => 'manage_options',
2426
)
2527
);
2628

27-
$wp_customize->add_setting(
28-
'cc_base_enabled_announcement',
29+
$wp_customize->add_setting(
30+
'cc_base_enabled_announcement',
2931
array(
30-
'default' => True,
32+
'default' => true,
3133
'transport' => 'refresh',
3234
'capability' => 'manage_options',
3335
)
3436
);
3537

36-
$wp_customize->add_setting(
37-
'cc_base_show_authors',
38+
$wp_customize->add_setting(
39+
'cc_base_show_authors',
3840
array(
39-
'default' => True,
41+
'default' => true,
4042
'transport' => 'refresh',
4143
'capability' => 'manage_options',
4244
)
4345
);
4446

45-
$wp_customize->add_control(
47+
$wp_customize->add_control(
4648
'cc_base_include_donate',
4749
array(
4850
'type' => 'checkbox',
4951
'section' => 'cc_base_display_settings_section',
50-
'label' => __( 'Include donate', 'cc_base_theme_settings' ),
51-
'description' => __( 'Include donate button in footer', 'cc_base_theme_settings' ),
52-
)
52+
'label' => __('Include donate', 'cc_base_theme_settings'),
53+
'description' => __('Include donate button in footer', 'cc_base_theme_settings'),
54+
)
5355
);
5456

55-
$wp_customize->add_control(
57+
$wp_customize->add_control(
5658
'cc_base_enabled_announcement',
5759
array(
5860
'type' => 'checkbox',
5961
'section' => 'cc_base_display_settings_section',
60-
'label' => __( 'Enable announcement', 'cc_base_theme_settings' ),
61-
'description' => __( 'Enable announcement area', 'cc_base_theme_settings' ),
62-
)
62+
'label' => __('Enable announcement', 'cc_base_theme_settings'),
63+
'description' => __('Enable announcement area', 'cc_base_theme_settings'),
64+
)
6365
);
6466

65-
$wp_customize->add_control(
67+
$wp_customize->add_control(
6668
'cc_base_show_authors',
6769
array(
6870
'type' => 'checkbox',
6971
'section' => 'cc_base_display_settings_section',
70-
'label' => __( 'Show authors', 'cc_base_theme_settings' ),
71-
'description' => __( 'Show authors on content', 'cc_base_theme_settings' ),
72-
)
72+
'label' => __('Show authors', 'cc_base_theme_settings'),
73+
'description' => __('Show authors on content', 'cc_base_theme_settings'),
74+
)
7375
);
7476
}
7577

76-
function register_featured_content_settings( $wp_customize ) {
77-
$wp_customize->add_section(
78+
function register_featured_content_settings($wp_customize)
79+
{
80+
$wp_customize->add_section(
7881
'cc_base_featured_content_section',
7982
array(
80-
'title' => __( 'Featured Content', 'cc_base_theme_settings' ),
83+
'title' => __('Featured Content', 'cc_base_theme_settings'),
8184
'priority' => 500,
8285
'capability' => 'edit_theme_options',
8386
)
8487
);
8588

86-
$wp_customize->add_setting(
87-
'cc_base_enable_featured_content',
89+
$wp_customize->add_setting(
90+
'cc_base_enable_featured_content',
8891
array(
89-
'default' => True,
92+
'default' => true,
9093
'transport' => 'refresh',
9194
'capability' => 'manage_options',
9295
)
9396
);
9497

95-
$wp_customize->add_setting(
96-
'cc_base_featured_content',
98+
$wp_customize->add_setting(
99+
'cc_base_featured_content',
97100
array(
98101
'default' => '',
99102
'transport' => 'refresh',
@@ -102,7 +105,7 @@ function register_featured_content_settings( $wp_customize ) {
102105
);
103106

104107
$wp_customize->add_setting(
105-
'cc_base_featured_content_background_color',
108+
'cc_base_featured_content_background_color',
106109
array(
107110
'default' => '#ffffff',
108111
'transport' => 'refresh',
@@ -111,56 +114,56 @@ function register_featured_content_settings( $wp_customize ) {
111114
);
112115

113116
$wp_customize->add_setting(
114-
'cc_base_featured_content_background_image',
117+
'cc_base_featured_content_background_image',
115118
array(
116-
'default' => NULL,
119+
'default' => null,
117120
'transport' => 'refresh',
118121
'capability' => 'manage_options',
119122
)
120123
);
121124

122-
$wp_customize->add_control(
125+
$wp_customize->add_control(
123126
'cc_base_enable_featured_content',
124127
array(
125128
'type' => 'checkbox',
126129
'section' => 'cc_base_featured_content_section',
127-
'label' => __( 'Enable featured content', 'cc_base_theme_settings' ),
128-
'description' => __( 'Enable featured content on homepage', 'cc_base_theme_settings' ),
129-
)
130+
'label' => __('Enable featured content', 'cc_base_theme_settings'),
131+
'description' => __('Enable featured content on homepage', 'cc_base_theme_settings'),
132+
)
130133
);
131134

132-
$wp_customize->add_control(
135+
$wp_customize->add_control(
133136
'cc_base_featured_content',
134137
array(
135138
'type' => 'textarea',
136139
'section' => 'cc_base_featured_content_section',
137-
'label' => __( 'Featured content', 'cc_base_theme_settings' ),
138-
'description' => __( 'Enter the featured content to display', 'cc_base_theme_settings' ),
139-
)
140+
'label' => __('Featured content', 'cc_base_theme_settings'),
141+
'description' => __('Enter the featured content to display', 'cc_base_theme_settings'),
142+
)
140143
);
141144

142145
$wp_customize->add_control(
143-
new WP_Customize_Media_Control(
144-
$wp_customize,
145-
'cc_base_featured_content_background_image',
146+
new WP_Customize_Media_Control(
147+
$wp_customize,
148+
'cc_base_featured_content_background_image',
146149
array(
147-
'label' => __( 'Background image', 'cc_base_theme_settings' ),
148-
'description' => __( 'Choose a background image for featured content', 'cc_base_theme_settings' ),
150+
'label' => __('Background image', 'cc_base_theme_settings'),
151+
'description' => __('Choose a background image for featured content', 'cc_base_theme_settings'),
149152
'section' => 'cc_base_featured_content_section',
150153
'mime_type' => 'image',
151154
)
152155
)
153156
);
154157

155-
$wp_customize->add_control(
156-
new WP_Customize_Color_Control(
157-
$wp_customize,
158-
'cc_base_featured_content_background_color',
158+
$wp_customize->add_control(
159+
new WP_Customize_Color_Control(
160+
$wp_customize,
161+
'cc_base_featured_content_background_color',
159162
array(
160-
'label' => __( 'Background color', 'cc_base_theme_settings' ),
161-
'description' => __( 'Choose a background color for featured content', 'cc_base_theme_settings' ),
163+
'label' => __('Background color', 'cc_base_theme_settings'),
164+
'description' => __('Choose a background color for featured content', 'cc_base_theme_settings'),
162165
'section' => 'cc_base_featured_content_section',
163166
)
164-
)
167+
)
165168
);
166-
}
169+
}

0 commit comments

Comments
 (0)