Skip to content

Commit 55c5a85

Browse files
Merge pull request #224 from MachoThemes/master
2.4.3
2 parents b3df3ad + 1ad9e7e commit 55c5a85

38 files changed

+1530
-1096
lines changed

404.php

+9-7
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@
3131
<h2 class="widgettitle"><?php esc_html_e( 'Most Used Categories', 'sparkling' ); ?></h2>
3232
<ul>
3333
<?php
34-
wp_list_categories( array(
35-
'orderby' => 'count',
36-
'order' => 'DESC',
37-
'show_count' => 1,
38-
'title_li' => '',
39-
'number' => 10,
40-
) );
34+
wp_list_categories(
35+
array(
36+
'orderby' => 'count',
37+
'order' => 'DESC',
38+
'show_count' => 1,
39+
'title_li' => '',
40+
'number' => 10,
41+
)
42+
);
4143
?>
4244
</ul>
4345
</div><!-- .widget -->

archive.php

+12-7
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<main id="main" class="site-main" role="main">
1414

1515
<?php
16-
if ( have_posts() ) : ?>
16+
if ( have_posts() ) :
17+
?>
1718

1819
<header class="page-header">
1920
<?php
@@ -24,7 +25,8 @@
2425

2526
<?php
2627
/* Start the Loop */
27-
while ( have_posts() ) : the_post();
28+
while ( have_posts() ) :
29+
the_post();
2830

2931
/*
3032
* Include the Post-Format-specific template for the content.
@@ -35,16 +37,19 @@
3537

3638
endwhile;
3739

38-
the_posts_pagination( array(
39-
'prev_text' => '<i class="fa fa-chevron-left"></i> ' . __( 'Newer posts', 'sparkling' ),
40-
'next_text' => __( 'Older posts', 'sparkling' ) . ' <i class="fa fa-chevron-right"></i>',
41-
) );
40+
the_posts_pagination(
41+
array(
42+
'prev_text' => '<i class="fa fa-chevron-left"></i> ' . __( 'Newer posts', 'sparkling' ),
43+
'next_text' => __( 'Older posts', 'sparkling' ) . ' <i class="fa fa-chevron-right"></i>',
44+
)
45+
);
4246

4347
else :
4448

4549
get_template_part( 'template-parts/content', 'none' );
4650

47-
endif; ?>
51+
endif;
52+
?>
4853

4954
</main><!-- #main -->
5055
</div><!-- #primary -->

comments.php

+11-7
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222

2323
<?php
2424
// You can start editing here -- including this comment!
25-
if ( have_comments() ) : ?>
25+
if ( have_comments() ) :
26+
?>
2627
<h2 class="comments-title">
2728
<?php
2829
$comments_number = get_comments_number();
@@ -60,11 +61,13 @@
6061

6162
<ol class="comment-list">
6263
<?php
63-
wp_list_comments( array(
64-
'style' => 'ol',
65-
'short_ping' => true,
66-
'avatar_size' => 60,
67-
) );
64+
wp_list_comments(
65+
array(
66+
'style' => 'ol',
67+
'short_ping' => true,
68+
'avatar_size' => 60,
69+
)
70+
);
6871
?>
6972
</ol><!-- .comment-list -->
7073

@@ -85,7 +88,8 @@
8588

8689

8790
// If comments are closed and there are comments, let's leave a little note, shall we?
88-
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>
91+
if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
92+
?>
8993

9094
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'sparkling' ); ?></p>
9195
<?php

footer.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
<footer id="colophon" class="site-footer" role="contentinfo">
2222
<div class="site-info container">
2323
<div class="row">
24-
<?php if ( of_get_option( 'footer_social' ) ) { sparkling_social_icons();} ?>
24+
<?php
25+
if ( of_get_option( 'footer_social' ) ) {
26+
sparkling_social_icons();}
27+
?>
2528
<nav role="navigation" class="col-md-6">
2629
<?php sparkling_footer_links(); ?>
2730
</nav>

functions.php

+113-90
Original file line numberDiff line numberDiff line change
@@ -68,28 +68,36 @@ function sparkling_setup() {
6868
add_image_size( 'tab-small', 60, 60, true ); // Small Thumbnail
6969

7070
// 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+
);
7577

7678
// Enable support for Post Formats.
7779
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
7880

7981
// 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+
);
8490

8591
// 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+
);
93101

94102
/*
95103
* Let WordPress manage the document title.
@@ -126,74 +134,88 @@ function sparkling_setup() {
126134
* Register widgetized area and update sidebar with default widgets.
127135
*/
128136
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+
);
197219

198220
register_widget( 'Sparkling_Social_Widget' );
199221
register_widget( 'Sparkling_Popular_Posts' );
@@ -205,7 +227,7 @@ function sparkling_widgets_init() {
205227

206228

207229
/* --------------------------------------------------------------
208-
Theme Widgets
230+
Theme Widgets
209231
-------------------------------------------------------------- */
210232
require_once( get_template_directory() . '/inc/widgets/class-sparkling-categories.php' );
211233
require_once( get_template_directory() . '/inc/widgets/class-sparkling-popular-posts.php' );
@@ -240,7 +262,6 @@ function sparkling_scripts() {
240262
wp_register_style( 'sparkling-fonts', '//fonts.googleapis.com/css?family=Open+Sans:400italic,400,600,700|Roboto+Slab:400,300,700' );
241263
}
242264

243-
244265
wp_enqueue_style( 'sparkling-fonts' );
245266

246267
// Add slider CSS only if is front page ans slider is enabled
@@ -258,10 +279,12 @@ function sparkling_scripts() {
258279
// Add slider JS only if is front page ans slider is enabled
259280
wp_enqueue_script( 'flexslider-js', get_template_directory_uri() . '/assets/js/vendor/flexslider.min.js', array( 'jquery' ), '20140222', true );
260281
// 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+
);
265288
}
266289

267290
// Main theme related functions
@@ -522,4 +545,4 @@ function sparkling_get_attachment_image() {
522545
new Epsilon_Framework( $epsilon_framework_settings );
523546

524547
//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

Comments
 (0)