diff --git a/404.php b/404.php index 7729e84..5796c8a 100644 --- a/404.php +++ b/404.php @@ -31,13 +31,15 @@

diff --git a/archive.php b/archive.php index be2f02e..4a125de 100644 --- a/archive.php +++ b/archive.php @@ -13,7 +13,8 @@
+ if ( have_posts() ) : + ?>
diff --git a/comments.php b/comments.php index 2972fbe..38f21fb 100644 --- a/comments.php +++ b/comments.php @@ -22,7 +22,8 @@ + if ( have_comments() ) : + ?>

'ol', - 'short_ping' => true, - 'avatar_size' => 60, - ) ); + wp_list_comments( + array( + 'style' => 'ol', + 'short_ping' => true, + 'avatar_size' => 60, + ) + ); ?> @@ -85,7 +88,8 @@ // If comments are closed and there are comments, let's leave a little note, shall we? - if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?> + if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : + ?>

- + diff --git a/functions.php b/functions.php index edbc55b..6017849 100644 --- a/functions.php +++ b/functions.php @@ -68,28 +68,36 @@ function sparkling_setup() { add_image_size( 'tab-small', 60, 60, true ); // Small Thumbnail // This theme uses wp_nav_menu() in one location. - register_nav_menus( array( - 'primary' => esc_html__( 'Primary Menu', 'sparkling' ), - 'footer-links' => esc_html__( 'Footer Links', 'sparkling' ),// secondary nav in footer - ) ); + register_nav_menus( + array( + 'primary' => esc_html__( 'Primary Menu', 'sparkling' ), + 'footer-links' => esc_html__( 'Footer Links', 'sparkling' ), // secondary nav in footer + ) + ); // Enable support for Post Formats. add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) ); // Setup the WordPress core custom background feature. - add_theme_support( 'custom-background', apply_filters( 'sparkling_custom_background_args', array( - 'default-color' => 'F2F2F2', - 'default-image' => '', - ) ) ); + add_theme_support( + 'custom-background', apply_filters( + 'sparkling_custom_background_args', array( + 'default-color' => 'F2F2F2', + 'default-image' => '', + ) + ) + ); // Enable support for HTML5 markup. - add_theme_support( 'html5', array( - 'comment-list', - 'search-form', - 'comment-form', - 'gallery', - 'caption', - ) ); + add_theme_support( + 'html5', array( + 'comment-list', + 'search-form', + 'comment-form', + 'gallery', + 'caption', + ) + ); /* * Let WordPress manage the document title. @@ -126,74 +134,88 @@ function sparkling_setup() { * Register widgetized area and update sidebar with default widgets. */ function sparkling_widgets_init() { - register_sidebar( array( - 'name' => esc_html__( 'Sidebar', 'sparkling' ), - 'id' => 'sidebar-1', - 'before_widget' => '', - 'before_title' => '

', - 'after_title' => '

', - ) ); - - register_sidebar( array( - 'id' => 'home-widget-1', - 'name' => esc_html__( 'Homepage Widget 1', 'sparkling' ), - 'description' => esc_html__( 'Displays on the Home Page', 'sparkling' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '

', - 'after_title' => '

', - ) ); - - register_sidebar( array( - 'id' => 'home-widget-2', - 'name' => esc_html__( 'Homepage Widget 2', 'sparkling' ), - 'description' => esc_html__( 'Displays on the Home Page', 'sparkling' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '

', - 'after_title' => '

', - ) ); - - register_sidebar( array( - 'id' => 'home-widget-3', - 'name' => esc_html__( 'Homepage Widget 3', 'sparkling' ), - 'description' => esc_html__( 'Displays on the Home Page', 'sparkling' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '

', - 'after_title' => '

', - ) ); - - register_sidebar( array( - 'id' => 'footer-widget-1', - 'name' => esc_html__( 'Footer Widget 1', 'sparkling' ), - 'description' => esc_html__( 'Used for footer widget area', 'sparkling' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '

', - 'after_title' => '

', - ) ); - - register_sidebar( array( - 'id' => 'footer-widget-2', - 'name' => esc_html__( 'Footer Widget 2', 'sparkling' ), - 'description' => esc_html__( 'Used for footer widget area', 'sparkling' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '

', - 'after_title' => '

', - ) ); - - register_sidebar( array( - 'id' => 'footer-widget-3', - 'name' => esc_html__( 'Footer Widget 3', 'sparkling' ), - 'description' => esc_html__( 'Used for footer widget area', 'sparkling' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '

', - 'after_title' => '

', - ) ); + register_sidebar( + array( + 'name' => esc_html__( 'Sidebar', 'sparkling' ), + 'id' => 'sidebar-1', + 'before_widget' => '', + 'before_title' => '

', + 'after_title' => '

', + ) + ); + + register_sidebar( + array( + 'id' => 'home-widget-1', + 'name' => esc_html__( 'Homepage Widget 1', 'sparkling' ), + 'description' => esc_html__( 'Displays on the Home Page', 'sparkling' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

', + ) + ); + + register_sidebar( + array( + 'id' => 'home-widget-2', + 'name' => esc_html__( 'Homepage Widget 2', 'sparkling' ), + 'description' => esc_html__( 'Displays on the Home Page', 'sparkling' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

', + ) + ); + + register_sidebar( + array( + 'id' => 'home-widget-3', + 'name' => esc_html__( 'Homepage Widget 3', 'sparkling' ), + 'description' => esc_html__( 'Displays on the Home Page', 'sparkling' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

', + ) + ); + + register_sidebar( + array( + 'id' => 'footer-widget-1', + 'name' => esc_html__( 'Footer Widget 1', 'sparkling' ), + 'description' => esc_html__( 'Used for footer widget area', 'sparkling' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

', + ) + ); + + register_sidebar( + array( + 'id' => 'footer-widget-2', + 'name' => esc_html__( 'Footer Widget 2', 'sparkling' ), + 'description' => esc_html__( 'Used for footer widget area', 'sparkling' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

', + ) + ); + + register_sidebar( + array( + 'id' => 'footer-widget-3', + 'name' => esc_html__( 'Footer Widget 3', 'sparkling' ), + 'description' => esc_html__( 'Used for footer widget area', 'sparkling' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '

', + 'after_title' => '

', + ) + ); register_widget( 'Sparkling_Social_Widget' ); register_widget( 'Sparkling_Popular_Posts' ); @@ -205,7 +227,7 @@ function sparkling_widgets_init() { /* -------------------------------------------------------------- - Theme Widgets + Theme Widgets -------------------------------------------------------------- */ require_once( get_template_directory() . '/inc/widgets/class-sparkling-categories.php' ); require_once( get_template_directory() . '/inc/widgets/class-sparkling-popular-posts.php' ); @@ -240,7 +262,6 @@ function sparkling_scripts() { wp_register_style( 'sparkling-fonts', '//fonts.googleapis.com/css?family=Open+Sans:400italic,400,600,700|Roboto+Slab:400,300,700' ); } - wp_enqueue_style( 'sparkling-fonts' ); // Add slider CSS only if is front page ans slider is enabled @@ -258,10 +279,12 @@ function sparkling_scripts() { // Add slider JS only if is front page ans slider is enabled wp_enqueue_script( 'flexslider-js', get_template_directory_uri() . '/assets/js/vendor/flexslider.min.js', array( 'jquery' ), '20140222', true ); // Flexslider customization - wp_enqueue_script( 'flexslider-customization', get_template_directory_uri() . '/assets/js/flexslider-custom.js', array( - 'jquery', - 'flexslider-js' - ), '20140716', true ); + wp_enqueue_script( + 'flexslider-customization', get_template_directory_uri() . '/assets/js/flexslider-custom.js', array( + 'jquery', + 'flexslider-js', + ), '20140716', true + ); } // Main theme related functions @@ -522,4 +545,4 @@ function sparkling_get_attachment_image() { new Epsilon_Framework( $epsilon_framework_settings ); //Include Welcome Screen -require get_template_directory() . '/inc/welcome-screen/welcome-page-setup.php'; \ No newline at end of file +require get_template_directory() . '/inc/welcome-screen/welcome-page-setup.php'; diff --git a/header.php b/header.php index b49e1dc..15495a6 100644 --- a/header.php +++ b/header.php @@ -7,7 +7,8 @@ * @package sparkling */ -if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && (strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false) ) { header( 'X-UA-Compatible: IE=edge,chrome=1' ); +if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE' ) !== false ) ) { + header( 'X-UA-Compatible: IE=edge,chrome=1' ); } ?>
diff --git a/image.php b/image.php index 8065efe..029f526 100644 --- a/image.php +++ b/image.php @@ -8,7 +8,10 @@ get_header(); ?> - +
>
@@ -33,14 +36,18 @@ * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery, * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file */ - $attachments = array_values( get_children( array( - 'post_parent' => $post->post_parent, - 'post_status' => 'inherit', - 'post_type' => 'attachment', - 'post_mime_type' => 'image', - 'order' => 'ASC', - 'orderby' => 'menu_order ID', - ) ) ); + $attachments = array_values( + get_children( + array( + 'post_parent' => $post->post_parent, + 'post_status' => 'inherit', + 'post_type' => 'attachment', + 'post_mime_type' => 'image', + 'order' => 'ASC', + 'orderby' => 'menu_order ID', + ) + ) + ); foreach ( $attachments as $k => $attachment ) { if ( $attachment->ID == $post->ID ) { break; @@ -61,10 +68,12 @@ } ?> - ID, $attachment_size ); - ?> + + ID, $attachment_size ); + ?> +
post_excerpt ) ) : ?> @@ -76,10 +85,12 @@ '', - ) ); + wp_link_pages( + array( + 'before' => '', + ) + ); ?>
diff --git a/inc/class-wp-bootstrap-navwalker.php b/inc/class-wp-bootstrap-navwalker.php index 4b8678f..38daf24 100644 --- a/inc/class-wp-bootstrap-navwalker.php +++ b/inc/class-wp-bootstrap-navwalker.php @@ -20,7 +20,7 @@ class WP_Bootstrap_Navwalker extends Walker_Nav_Menu { * @param int $depth Depth of page. Used for padding. */ public function start_lvl( &$output, $depth = 0, $args = array() ) { - $indent = str_repeat( "\t", $depth ); + $indent = str_repeat( "\t", $depth ); $output .= "\n$indent @@ -75,7 +78,7 @@ function widget( $args, $instance ) { function form( $instance ) { if ( ! isset( $instance['title'] ) ) { - $instance['title'] = esc_html__( 'Categories' , 'sparkling' ); + $instance['title'] = esc_html__( 'Categories', 'sparkling' ); } if ( ! isset( $instance['limit'] ) ) { $instance['limit'] = 4; @@ -86,7 +89,7 @@ function form( $instance ) { ?> -

+

-

+

+

'sparkling-popular-posts', + 'classname' => 'sparkling-popular-posts', 'description' => esc_html__( 'Sparkling Popular Posts Widget', 'sparkling' ), ); - parent::__construct( 'sparkling_popular_posts', esc_html__( 'Sparkling Popular Posts Widget','sparkling' ), $widget_ops ); + parent::__construct( 'sparkling_popular_posts', esc_html__( 'Sparkling Popular Posts Widget', 'sparkling' ), $widget_ops ); } public function enqueue() { @@ -28,8 +28,8 @@ public function enqueue() { } function widget( $args, $instance ) { - $title = isset( $instance['title'] ) ? $instance['title'] : esc_html__( 'Popular Posts', 'sparkling' ); - $limit = isset( $instance['limit'] ) ? $instance['limit'] : 5; + $title = isset( $instance['title'] ) ? $instance['title'] : esc_html__( 'Popular Posts', 'sparkling' ); + $limit = isset( $instance['limit'] ) ? $instance['limit'] : 5; $default_image = isset( $instance['default_image'] ) ? $instance['default_image'] : ''; echo $args['before_widget']; @@ -48,9 +48,9 @@ function widget( $args, $instance ) { $limit, - 'orderby' => 'comment_count', - 'order' => 'DESC', + 'posts_per_page' => $limit, + 'orderby' => 'comment_count', + 'order' => 'DESC', 'ignore_sticky_posts' => 1, ); @@ -59,11 +59,13 @@ function widget( $args, $instance ) { /** * Check if zilla likes plugin exists */ - if ( $featured_query->have_posts() ) : while ( $featured_query->have_posts() ) : $featured_query->the_post(); + if ( $featured_query->have_posts() ) : + while ( $featured_query->have_posts() ) : + $featured_query->the_post(); - ?> + ?> - +
@@ -74,8 +76,8 @@ function widget( $args, $instance ) { @@ -87,7 +89,7 @@ function widget( $args, $instance ) {
- +
@@ -95,7 +97,7 @@ function widget( $args, $instance ) { - -

+

- -

+

-

+

- -

-

-

- - +

+

+ + -

-
+

+
-
>
- - +
>
+ +
diff --git a/inc/widgets/class-sparkling-social-widget.php b/inc/widgets/class-sparkling-social-widget.php index 3f8bf03..e801059 100644 --- a/inc/widgets/class-sparkling-social-widget.php +++ b/inc/widgets/class-sparkling-social-widget.php @@ -9,15 +9,15 @@ class Sparkling_Social_Widget extends WP_Widget { function __construct() { $widget_ops = array( - 'classname' => 'sparkling-social', - 'description' => esc_html__( 'Sparkling Social Widget' ,'sparkling' ), + 'classname' => 'sparkling-social', + 'description' => esc_html__( 'Sparkling Social Widget', 'sparkling' ), ); - parent::__construct( 'sparkling-social', esc_html__( 'Sparkling Social Widget','sparkling' ), $widget_ops ); + parent::__construct( 'sparkling-social', esc_html__( 'Sparkling Social Widget', 'sparkling' ), $widget_ops ); } function widget( $args, $instance ) { - $title = isset( $instance['title'] ) ? $instance['title'] : esc_html__( 'Follow us' , 'sparkling' ); + $title = isset( $instance['title'] ) ? $instance['title'] : esc_html__( 'Follow us', 'sparkling' ); echo $args['before_widget']; echo $args['before_title']; @@ -33,17 +33,19 @@ function widget( $args, $instance ) { -
+ + $instance['title'] = esc_html__( 'Follow us', 'sparkling' ); + } + ?> -

+

+ if ( is_home() && ! is_front_page() ) : + ?>

@@ -25,7 +26,8 @@ endif; /* Start the Loop */ - while ( have_posts() ) : the_post(); + while ( have_posts() ) : + the_post(); /* * Include the Post-Format-specific template for the content. @@ -39,17 +41,20 @@ if ( function_exists( 'wp_pagenavi' ) ) { wp_pagenavi(); } else { - the_posts_pagination( array( - 'prev_text' => ' ' . __( 'Newer posts', 'sparkling' ), - 'next_text' => __( 'Older posts', 'sparkling' ) . ' ', - ) ); + the_posts_pagination( + array( + 'prev_text' => ' ' . __( 'Newer posts', 'sparkling' ), + 'next_text' => __( 'Older posts', 'sparkling' ) . ' ', + ) + ); } else : get_template_part( 'template-parts/content', 'none' ); - endif; ?> + endif; + ?>
diff --git a/package.json b/package.json index 41a2b1c..7e89a99 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "sparkling", "main": "Gruntfile.js", - "version": "2.4.2", + "version": "2.4.3", "homepage": "https://www.colorlib.com", "author": "Colorlib", "license": "GPL v3", diff --git a/page-fullwidth.php b/page-fullwidth.php index 5b6d698..3f6c331 100644 --- a/page-fullwidth.php +++ b/page-fullwidth.php @@ -13,7 +13,10 @@
- + diff --git a/page.php b/page.php index f35a4cc..32e3720 100644 --- a/page.php +++ b/page.php @@ -16,7 +16,10 @@
- + diff --git a/readme.md b/readme.md index b52ac5d..e65f66e 100644 --- a/readme.md +++ b/readme.md @@ -64,6 +64,9 @@ Theme documentation is available on http://colorlib.com/wp/support/sparkling # Changelog +# 2.4.3 +* Fixed a few more bugs with FA5 & missing icons + # 2.4.1 * Fixed a bug with FontAwesome 5 & RSS feed icon diff --git a/search.php b/search.php index 2e53269..b2c579e 100644 --- a/search.php +++ b/search.php @@ -11,7 +11,8 @@
+ if ( have_posts() ) : + ?>
diff --git a/sidebar.php b/sidebar.php index 379aaed..396e7b3 100644 --- a/sidebar.php +++ b/sidebar.php @@ -15,7 +15,8 @@ $archives_args = array( 'type' => 'monthly', ); - wp_get_archives( $archives_args ); ?> + wp_get_archives( $archives_args ); + ?> diff --git a/single.php b/single.php index 1ad386b..ec8143e 100644 --- a/single.php +++ b/single.php @@ -11,7 +11,8 @@
'%title ', - 'prev_text' => ' %title', - ) ); + the_post_navigation( + array( + 'next_text' => '%title ', + 'prev_text' => ' %title', + ) + ); endwhile; // end of the loop. ?> diff --git a/style.css b/style.css index 788d82c..dfce9b5 100644 --- a/style.css +++ b/style.css @@ -4,7 +4,7 @@ Theme URI: http://colorlib.com/wp/themes/sparkling Author: Colorlib Author URI: http://colorlib.com/ Description: Sparkling is a clean minimal and responsive WordPress theme well suited for travel, health, business, finance, portfolio, design, art, photography, personal, ecommerce and any other creative websites and blogs. Developed using Bootstrap 3 that makes it mobile and tablets friendly. Theme comes with full-screen slider, social icon integration, author bio, popular posts widget and improved category widget. Sparkling incorporates latest web standards such as HTML5 and CSS3 and is SEO friendly thanks to its clean structure and codebase. It has dozens of Theme Options based on WordPress Customizer to change theme layout, colors, fonts, slider settings and much more. Theme is also translation and multilingual ready, compatible with WPML and is available in Spanish, French, Dutch, Polish, Russian, German, Brazilian Portuguese, Portuguese (Portugal), Persian (Iranian language), Romanian, Turkish, Bulgarian, Japanese, Lithuanian, Czech, Ukrainian, Traditional Chinese, Simplified Chinese, Indonesian, Estonian, Spanish (Argentina), Hungarian and Italian. Sparkling is a free WordPress theme with premium functionality and design. Theme is ecommerce ready thanks to its WooCommerce integration. Now theme is optimized to work with bbPress, Contact Form 7, Jetpack, WooCommerce and other popular free and premium plugins. Lately we introduced a sticky/fixed navigation that you can enable or disable via WordPress Customizer. -Version: 2.4.2 +Version: 2.4.3 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: sparkling diff --git a/template-parts/content-none.php b/template-parts/content-none.php index 850eec6..8ac3f45 100644 --- a/template-parts/content-none.php +++ b/template-parts/content-none.php @@ -14,9 +14,11 @@
+ if ( is_home() && current_user_can( 'publish_posts' ) ) : + ?> -

+ array( 'href' => array(), @@ -24,18 +26,21 @@ ); printf( wp_kses( __( 'Ready to publish your first post? Get started here.', 'sparkling' ), $wp_kses_args ), esc_url( admin_url( 'post-new.php' ) ) ); - ?>

+ ?> +

+ else : + ?>

+ endif; + ?>
diff --git a/template-parts/content-page.php b/template-parts/content-page.php index a8ea9e1..17d8c19 100644 --- a/template-parts/content-page.php +++ b/template-parts/content-page.php @@ -8,12 +8,17 @@ 'single-featured', - ) ); -} else { the_post_thumbnail( 'sparkling-featured', array( - 'class' => 'single-featured', -) ); + the_post_thumbnail( + 'sparkling-featured-fullwidth', array( + 'class' => 'single-featured', + ) + ); +} else { + the_post_thumbnail( + 'sparkling-featured', array( + 'class' => 'single-featured', + ) + ); } ?> @@ -26,10 +31,12 @@
'', - ) ); + wp_link_pages( + array( + 'before' => '', + ) + ); ?> "', '"', false ) ), - '', + '', '' ); ?> diff --git a/template-parts/content-single.php b/template-parts/content-single.php index 49d8f7e..22c1a5c 100644 --- a/template-parts/content-single.php +++ b/template-parts/content-single.php @@ -22,7 +22,7 @@ $categories_list = get_the_category_list( esc_html__( ', ', 'sparkling' ) ); if ( $categories_list && sparkling_categorized_blog() ) : ?> - + @@ -34,7 +34,7 @@ esc_html__( 'Edit %s', 'sparkling' ), the_title( '"', '"', false ) ), - '', + '', '' ); ?> @@ -46,14 +46,16 @@
'', - 'link_before' => '', - 'link_after' => '', - 'pagelink' => '%', - 'echo' => 1, - ) ); + wp_link_pages( + array( + 'before' => '', + 'link_before' => '', + 'link_after' => '', + 'pagelink' => '%', + 'echo' => 1, + ) + ); ?>
@@ -67,7 +69,8 @@ $tags = get_the_tags( get_the_ID() ); foreach ( $tags as $tag ) { echo '' . $tag->name . ' '; - } ?> + } + ?>
@@ -76,14 +79,14 @@
- +
- +
diff --git a/template-parts/content-video.php b/template-parts/content-video.php index 56f1bfd..918fb72 100644 --- a/template-parts/content-video.php +++ b/template-parts/content-video.php @@ -9,25 +9,25 @@ '; - echo $video_html; - echo '
'; - } - }elseif ( has_post_thumbnail() ) { - $thumbnail_args = array( - 'class' => 'single-featured', - ); - $title_args = array( - 'echo' => false, - ); - echo ''; - the_post_thumbnail( 'sparkling-featured-fullwidth', $thumbnail_args); - echo ''; + if ( ! empty( $video ) ) { + foreach ( $video as $video_html ) { + echo '
'; + echo $video_html; + echo '
'; } + } elseif ( has_post_thumbnail() ) { + $thumbnail_args = array( + 'class' => 'single-featured', + ); + $title_args = array( + 'echo' => false, + ); + echo ''; + the_post_thumbnail( 'sparkling-featured-fullwidth', $thumbnail_args ); + echo ''; + } ?>
@@ -38,7 +38,7 @@ diff --git a/template-parts/content.php b/template-parts/content.php index 3ef77c4..083a648 100644 --- a/template-parts/content.php +++ b/template-parts/content.php @@ -9,12 +9,17 @@ 'single-featured', - ) ); - } else { the_post_thumbnail( 'sparkling-featured', array( - 'class' => 'single-featured', - ) ); + the_post_thumbnail( + 'sparkling-featured-fullwidth', array( + 'class' => 'single-featured', + ) + ); + } else { + the_post_thumbnail( + 'sparkling-featured', array( + 'class' => 'single-featured', + ) + ); } ?> @@ -26,7 +31,7 @@