@@ -68,28 +68,36 @@ function sparkling_setup() {
68
68
add_image_size ( 'tab-small ' , 60 , 60 , true ); // Small Thumbnail
69
69
70
70
// This theme uses wp_nav_menu() in one location.
71
- register_nav_menus ( array (
72
- 'primary ' => esc_html__ ( 'Primary Menu ' , 'sparkling ' ),
73
- 'footer-links ' => esc_html__ ( 'Footer Links ' , 'sparkling ' ),// secondary nav in footer
74
- ) );
71
+ register_nav_menus (
72
+ array (
73
+ 'primary ' => esc_html__ ( 'Primary Menu ' , 'sparkling ' ),
74
+ 'footer-links ' => esc_html__ ( 'Footer Links ' , 'sparkling ' ), // secondary nav in footer
75
+ )
76
+ );
75
77
76
78
// Enable support for Post Formats.
77
79
add_theme_support ( 'post-formats ' , array ( 'aside ' , 'image ' , 'video ' , 'quote ' , 'link ' ) );
78
80
79
81
// Setup the WordPress core custom background feature.
80
- add_theme_support ( 'custom-background ' , apply_filters ( 'sparkling_custom_background_args ' , array (
81
- 'default-color ' => 'F2F2F2 ' ,
82
- 'default-image ' => '' ,
83
- ) ) );
82
+ add_theme_support (
83
+ 'custom-background ' , apply_filters (
84
+ 'sparkling_custom_background_args ' , array (
85
+ 'default-color ' => 'F2F2F2 ' ,
86
+ 'default-image ' => '' ,
87
+ )
88
+ )
89
+ );
84
90
85
91
// Enable support for HTML5 markup.
86
- add_theme_support ( 'html5 ' , array (
87
- 'comment-list ' ,
88
- 'search-form ' ,
89
- 'comment-form ' ,
90
- 'gallery ' ,
91
- 'caption ' ,
92
- ) );
92
+ add_theme_support (
93
+ 'html5 ' , array (
94
+ 'comment-list ' ,
95
+ 'search-form ' ,
96
+ 'comment-form ' ,
97
+ 'gallery ' ,
98
+ 'caption ' ,
99
+ )
100
+ );
93
101
94
102
/*
95
103
* Let WordPress manage the document title.
@@ -126,74 +134,88 @@ function sparkling_setup() {
126
134
* Register widgetized area and update sidebar with default widgets.
127
135
*/
128
136
function sparkling_widgets_init () {
129
- register_sidebar ( array (
130
- 'name ' => esc_html__ ( 'Sidebar ' , 'sparkling ' ),
131
- 'id ' => 'sidebar-1 ' ,
132
- 'before_widget ' => '<aside id="%1$s" class="widget %2$s"> ' ,
133
- 'after_widget ' => '</aside> ' ,
134
- 'before_title ' => '<h3 class="widget-title"> ' ,
135
- 'after_title ' => '</h3> ' ,
136
- ) );
137
-
138
- register_sidebar ( array (
139
- 'id ' => 'home-widget-1 ' ,
140
- 'name ' => esc_html__ ( 'Homepage Widget 1 ' , 'sparkling ' ),
141
- 'description ' => esc_html__ ( 'Displays on the Home Page ' , 'sparkling ' ),
142
- 'before_widget ' => '<div id="%1$s" class="widget %2$s"> ' ,
143
- 'after_widget ' => '</div> ' ,
144
- 'before_title ' => '<h3 class="widgettitle"> ' ,
145
- 'after_title ' => '</h3> ' ,
146
- ) );
147
-
148
- register_sidebar ( array (
149
- 'id ' => 'home-widget-2 ' ,
150
- 'name ' => esc_html__ ( 'Homepage Widget 2 ' , 'sparkling ' ),
151
- 'description ' => esc_html__ ( 'Displays on the Home Page ' , 'sparkling ' ),
152
- 'before_widget ' => '<div id="%1$s" class="widget %2$s"> ' ,
153
- 'after_widget ' => '</div> ' ,
154
- 'before_title ' => '<h3 class="widgettitle"> ' ,
155
- 'after_title ' => '</h3> ' ,
156
- ) );
157
-
158
- register_sidebar ( array (
159
- 'id ' => 'home-widget-3 ' ,
160
- 'name ' => esc_html__ ( 'Homepage Widget 3 ' , 'sparkling ' ),
161
- 'description ' => esc_html__ ( 'Displays on the Home Page ' , 'sparkling ' ),
162
- 'before_widget ' => '<div id="%1$s" class="widget %2$s"> ' ,
163
- 'after_widget ' => '</div> ' ,
164
- 'before_title ' => '<h3 class="widgettitle"> ' ,
165
- 'after_title ' => '</h3> ' ,
166
- ) );
167
-
168
- register_sidebar ( array (
169
- 'id ' => 'footer-widget-1 ' ,
170
- 'name ' => esc_html__ ( 'Footer Widget 1 ' , 'sparkling ' ),
171
- 'description ' => esc_html__ ( 'Used for footer widget area ' , 'sparkling ' ),
172
- 'before_widget ' => '<div id="%1$s" class="widget %2$s"> ' ,
173
- 'after_widget ' => '</div> ' ,
174
- 'before_title ' => '<h3 class="widgettitle"> ' ,
175
- 'after_title ' => '</h3> ' ,
176
- ) );
177
-
178
- register_sidebar ( array (
179
- 'id ' => 'footer-widget-2 ' ,
180
- 'name ' => esc_html__ ( 'Footer Widget 2 ' , 'sparkling ' ),
181
- 'description ' => esc_html__ ( 'Used for footer widget area ' , 'sparkling ' ),
182
- 'before_widget ' => '<div id="%1$s" class="widget %2$s"> ' ,
183
- 'after_widget ' => '</div> ' ,
184
- 'before_title ' => '<h3 class="widgettitle"> ' ,
185
- 'after_title ' => '</h3> ' ,
186
- ) );
187
-
188
- register_sidebar ( array (
189
- 'id ' => 'footer-widget-3 ' ,
190
- 'name ' => esc_html__ ( 'Footer Widget 3 ' , 'sparkling ' ),
191
- 'description ' => esc_html__ ( 'Used for footer widget area ' , 'sparkling ' ),
192
- 'before_widget ' => '<div id="%1$s" class="widget %2$s"> ' ,
193
- 'after_widget ' => '</div> ' ,
194
- 'before_title ' => '<h3 class="widgettitle"> ' ,
195
- 'after_title ' => '</h3> ' ,
196
- ) );
137
+ register_sidebar (
138
+ array (
139
+ 'name ' => esc_html__ ( 'Sidebar ' , 'sparkling ' ),
140
+ 'id ' => 'sidebar-1 ' ,
141
+ 'before_widget ' => '<aside id="%1$s" class="widget %2$s"> ' ,
142
+ 'after_widget ' => '</aside> ' ,
143
+ 'before_title ' => '<h3 class="widget-title"> ' ,
144
+ 'after_title ' => '</h3> ' ,
145
+ )
146
+ );
147
+
148
+ register_sidebar (
149
+ array (
150
+ 'id ' => 'home-widget-1 ' ,
151
+ 'name ' => esc_html__ ( 'Homepage Widget 1 ' , 'sparkling ' ),
152
+ 'description ' => esc_html__ ( 'Displays on the Home Page ' , 'sparkling ' ),
153
+ 'before_widget ' => '<div id="%1$s" class="widget %2$s"> ' ,
154
+ 'after_widget ' => '</div> ' ,
155
+ 'before_title ' => '<h3 class="widgettitle"> ' ,
156
+ 'after_title ' => '</h3> ' ,
157
+ )
158
+ );
159
+
160
+ register_sidebar (
161
+ array (
162
+ 'id ' => 'home-widget-2 ' ,
163
+ 'name ' => esc_html__ ( 'Homepage Widget 2 ' , 'sparkling ' ),
164
+ 'description ' => esc_html__ ( 'Displays on the Home Page ' , 'sparkling ' ),
165
+ 'before_widget ' => '<div id="%1$s" class="widget %2$s"> ' ,
166
+ 'after_widget ' => '</div> ' ,
167
+ 'before_title ' => '<h3 class="widgettitle"> ' ,
168
+ 'after_title ' => '</h3> ' ,
169
+ )
170
+ );
171
+
172
+ register_sidebar (
173
+ array (
174
+ 'id ' => 'home-widget-3 ' ,
175
+ 'name ' => esc_html__ ( 'Homepage Widget 3 ' , 'sparkling ' ),
176
+ 'description ' => esc_html__ ( 'Displays on the Home Page ' , 'sparkling ' ),
177
+ 'before_widget ' => '<div id="%1$s" class="widget %2$s"> ' ,
178
+ 'after_widget ' => '</div> ' ,
179
+ 'before_title ' => '<h3 class="widgettitle"> ' ,
180
+ 'after_title ' => '</h3> ' ,
181
+ )
182
+ );
183
+
184
+ register_sidebar (
185
+ array (
186
+ 'id ' => 'footer-widget-1 ' ,
187
+ 'name ' => esc_html__ ( 'Footer Widget 1 ' , 'sparkling ' ),
188
+ 'description ' => esc_html__ ( 'Used for footer widget area ' , 'sparkling ' ),
189
+ 'before_widget ' => '<div id="%1$s" class="widget %2$s"> ' ,
190
+ 'after_widget ' => '</div> ' ,
191
+ 'before_title ' => '<h3 class="widgettitle"> ' ,
192
+ 'after_title ' => '</h3> ' ,
193
+ )
194
+ );
195
+
196
+ register_sidebar (
197
+ array (
198
+ 'id ' => 'footer-widget-2 ' ,
199
+ 'name ' => esc_html__ ( 'Footer Widget 2 ' , 'sparkling ' ),
200
+ 'description ' => esc_html__ ( 'Used for footer widget area ' , 'sparkling ' ),
201
+ 'before_widget ' => '<div id="%1$s" class="widget %2$s"> ' ,
202
+ 'after_widget ' => '</div> ' ,
203
+ 'before_title ' => '<h3 class="widgettitle"> ' ,
204
+ 'after_title ' => '</h3> ' ,
205
+ )
206
+ );
207
+
208
+ register_sidebar (
209
+ array (
210
+ 'id ' => 'footer-widget-3 ' ,
211
+ 'name ' => esc_html__ ( 'Footer Widget 3 ' , 'sparkling ' ),
212
+ 'description ' => esc_html__ ( 'Used for footer widget area ' , 'sparkling ' ),
213
+ 'before_widget ' => '<div id="%1$s" class="widget %2$s"> ' ,
214
+ 'after_widget ' => '</div> ' ,
215
+ 'before_title ' => '<h3 class="widgettitle"> ' ,
216
+ 'after_title ' => '</h3> ' ,
217
+ )
218
+ );
197
219
198
220
register_widget ( 'Sparkling_Social_Widget ' );
199
221
register_widget ( 'Sparkling_Popular_Posts ' );
@@ -205,7 +227,7 @@ function sparkling_widgets_init() {
205
227
206
228
207
229
/* --------------------------------------------------------------
208
- Theme Widgets
230
+ Theme Widgets
209
231
-------------------------------------------------------------- */
210
232
require_once ( get_template_directory () . '/inc/widgets/class-sparkling-categories.php ' );
211
233
require_once ( get_template_directory () . '/inc/widgets/class-sparkling-popular-posts.php ' );
@@ -240,7 +262,6 @@ function sparkling_scripts() {
240
262
wp_register_style ( 'sparkling-fonts ' , '//fonts.googleapis.com/css?family=Open+Sans:400italic,400,600,700|Roboto+Slab:400,300,700 ' );
241
263
}
242
264
243
-
244
265
wp_enqueue_style ( 'sparkling-fonts ' );
245
266
246
267
// Add slider CSS only if is front page ans slider is enabled
@@ -258,10 +279,12 @@ function sparkling_scripts() {
258
279
// Add slider JS only if is front page ans slider is enabled
259
280
wp_enqueue_script ( 'flexslider-js ' , get_template_directory_uri () . '/assets/js/vendor/flexslider.min.js ' , array ( 'jquery ' ), '20140222 ' , true );
260
281
// Flexslider customization
261
- wp_enqueue_script ( 'flexslider-customization ' , get_template_directory_uri () . '/assets/js/flexslider-custom.js ' , array (
262
- 'jquery ' ,
263
- 'flexslider-js '
264
- ), '20140716 ' , true );
282
+ wp_enqueue_script (
283
+ 'flexslider-customization ' , get_template_directory_uri () . '/assets/js/flexslider-custom.js ' , array (
284
+ 'jquery ' ,
285
+ 'flexslider-js ' ,
286
+ ), '20140716 ' , true
287
+ );
265
288
}
266
289
267
290
// Main theme related functions
@@ -522,4 +545,4 @@ function sparkling_get_attachment_image() {
522
545
new Epsilon_Framework ( $ epsilon_framework_settings );
523
546
524
547
//Include Welcome Screen
525
- require get_template_directory () . '/inc/welcome-screen/welcome-page-setup.php ' ;
548
+ require get_template_directory () . '/inc/welcome-screen/welcome-page-setup.php ' ;
0 commit comments