Skip to content

Commit

Permalink
Merge pull request #228 from MachoThemes/master
Browse files Browse the repository at this point in the history
v 2.4.4 update
  • Loading branch information
cristianraiber authored Jun 20, 2018
2 parents 55c5a85 + c933383 commit 5dc4521
Show file tree
Hide file tree
Showing 5 changed files with 195 additions and 10 deletions.
63 changes: 63 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,69 @@ function sparkling_remove_gallery_css( $css ) {

add_filter( 'gallery_style', 'sparkling_remove_gallery_css' );


function sparkling_archive_pages_title($title) {
if (is_tag()) {
$template = of_get_option('tag_title');
if (empty($template)) {
return $title;
}
else {
return sprintf($template, single_tag_title('', false));
}
}
elseif (is_category()) {
$template = of_get_option('category_title');
if (empty($template)) {
return $title;
}
else {
return sprintf($template, single_cat_title('', false));
}
}
elseif (is_author()) {
$template = of_get_option('author_title');
if (empty($template)) {
return $title;
}
else {
return sprintf($template, get_the_author());
}
}
elseif (is_year()) {
$template = of_get_option('year_title');
if (empty($template)) {
return $title;
}
else {
return sprintf($template, get_the_date(_x('Y', 'yearly archives date format')));
}
}
elseif (is_month()) {
$template = of_get_option('month_title');
if (empty($template)) {
return $title;
}
else {
return sprintf($template, get_the_date(_x('F Y', 'monthly archives date format')));
}
}
elseif (is_day()) {
$template = of_get_option('day_title');
if (empty($template)) {
return $title;
}
else {
return sprintf($template, get_the_date(_x('F j, Y', 'daily archives date format')));
}
}
else {
return $title;
}
}

add_filter('get_the_archive_title', 'sparkling_archive_pages_title');

/**
* Enqueue scripts and styles.
*/
Expand Down
116 changes: 113 additions & 3 deletions inc/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function sparkling_customizer( $wp_customize ) {
/* Sparkling Main Options */
$wp_customize->add_section(
'sparkling_slider_options', array(
'title' => __( 'Slider options', 'sparkling' ),
'title' => __( 'Slider Options', 'sparkling' ),
'priority' => 31,
'panel' => 'sparkling_main_options',
)
Expand Down Expand Up @@ -161,7 +161,7 @@ function sparkling_customizer( $wp_customize ) {

$wp_customize->add_section(
'sparkling_layout_options', array(
'title' => __( 'Layout options', 'sparkling' ),
'title' => __( 'Layout Options', 'sparkling' ),
'priority' => 31,
'panel' => 'sparkling_main_options',
)
Expand Down Expand Up @@ -446,7 +446,7 @@ function sparkling_customizer( $wp_customize ) {
);
$wp_customize->add_control(
'sparkling[main_body_typography][subset]', array(
'label' => __( 'Font susbet', 'sparkling' ),
'label' => __( 'Font Subset', 'sparkling' ),
'section' => 'sparkling_typography_options',
'description' => __( 'Enter the Google fonts subset', 'sparkling' ),
'type' => 'text',
Expand Down Expand Up @@ -815,6 +815,116 @@ function sparkling_customizer( $wp_customize ) {
)
);

/* Archive pages settings */
$wp_customize->add_section(
'sparkling_archive_section', array(
'title' => esc_html__( 'Archive Pages', 'sparkling' ),
'priority' => 50,
'panel' => 'sparkling_main_options',
)
);

$wp_customize->add_setting(
'sparkling[tag_title]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_html',
)
);

$wp_customize->add_control(
'sparkling[tag_title]', array(
'label' => __( 'Tag Page Title', 'sparkling' ),
'section' => 'sparkling_archive_section',
'description' => __( 'The headline for your tag pages. You can use %s as a placeholder for the tag. Leave empty for default.', 'sparkling' ),
'type' => 'text',
)
);

$wp_customize->add_setting(
'sparkling[category_title]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_html',
)
);

$wp_customize->add_control(
'sparkling[category_title]', array(
'label' => __( 'Category Page Title', 'sparkling' ),
'section' => 'sparkling_archive_section',
'description' => __( 'The headline for your category pages. You can use %s as a placeholder for the category. Leave empty for default.', 'sparkling' ),
'type' => 'text',
)
);

$wp_customize->add_setting(
'sparkling[author_title]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_html',
)
);

$wp_customize->add_control(
'sparkling[author_title]', array(
'label' => __( 'Author Page Title', 'sparkling' ),
'section' => 'sparkling_archive_section',
'description' => __( 'The headline for your author pages. You can use %s as a placeholder for the author\'s name. Leave empty for default.', 'sparkling' ),
'type' => 'text',
)
);

$wp_customize->add_setting(
'sparkling[year_title]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_html',
)
);

$wp_customize->add_control(
'sparkling[year_title]', array(
'label' => __( 'Year Page Title', 'sparkling' ),
'section' => 'sparkling_archive_section',
'description' => __( 'The headline for your year pages. You can use %s as a placeholder for the year. Leave empty for default.', 'sparkling' ),
'type' => 'text',
)
);

$wp_customize->add_setting(
'sparkling[month_title]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_html',
)
);

$wp_customize->add_control(
'sparkling[month_title]', array(
'label' => __( 'Month Page Title', 'sparkling' ),
'section' => 'sparkling_archive_section',
'description' => __( 'The headline for your month pages. You can use %s as a placeholder for the month. Leave empty for default.', 'sparkling' ),
'type' => 'text',
)
);

$wp_customize->add_setting(
'sparkling[day_title]', array(
'default' => '',
'type' => 'option',
'sanitize_callback' => 'esc_html',
)
);

$wp_customize->add_control(
'sparkling[day_title]', array(
'label' => __( 'Day Page Title', 'sparkling' ),
'section' => 'sparkling_archive_section',
'description' => __( 'The headline for your day pages. You can use %s as a placeholder for the day. Leave empty for default.', 'sparkling' ),
'type' => 'text',
)
);
}

add_action( 'customize_register', 'sparkling_customizer' );
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sparkling",
"main": "Gruntfile.js",
"version": "2.4.3",
"version": "2.4.4",
"homepage": "https://www.colorlib.com",
"author": "Colorlib",
"license": "GPL v3",
Expand Down
9 changes: 6 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

Theme Name: Sparkling<br>
Theme URI: http://colorlib.com/wp/sparkling/<br>
Version: 2.3.4<br>
Tested up to: WP 4.8<br>
Version: 2.4.4<br>
Tested up to: WP 4.9<br>

Author: Aigars Silkalns<br>
Author URI: http://colorlib.com/wp/<br>
License: GNU General Public License v3.0
License URI: http://www.gnu.org/licenses/gpl.html
-------------------------------------------------------
Sparkling theme, Copyright 2014-2017 colorlib.com
Sparkling theme, Copyright 2014-2018 colorlib.com
Sparkling WordPress theme is distributed under the terms of the GNU GPL
Sparkling is based on Underscores http://underscores.me/, (C) 2012-2017 Automattic, Inc.
-------------------------------------------------------
Expand Down Expand Up @@ -64,6 +64,9 @@ Theme documentation is available on http://colorlib.com/wp/support/sparkling

# Changelog

# 2.4.4
* Removed subject tags, can't keep more than 3 as per w.org rules

# 2.4.3
* Fixed a few more bugs with FA5 & missing icons

Expand Down
15 changes: 12 additions & 3 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ 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.3
Version: 2.4.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sparkling
Domain Path: /languages/
Tags: grid-layout, footer-widgets, blog, education, entertainment, food-and-drink, news, photography, portfolio, e-commerce
Tags: blog, news, e-commerce
This theme, like WordPress, is licensed under the GPL.
Expand Down Expand Up @@ -2013,6 +2013,10 @@ p.logged-in-as {
background-color: #4183C4 !important;
}

#menu-social li a[href*="gitlab.com"]:hover {
background-color: #fc9403 !important;
}

#menu-social li a[href*="stackoverflow.com"]:hover {
background-color: #F48024 !important;
}
Expand Down Expand Up @@ -2061,6 +2065,11 @@ p.logged-in-as {
content: "\f09b"
}

#menu-social li a[href*="gitlab.com"]:before {
font-family: 'Font Awesome\ 5 Brands';
content: "\f296"
}

#menu-social li a[href*="stackoverflow.com"]:before {
font-family: 'Font Awesome\ 5 Brands';
content: "\f16c"
Expand Down Expand Up @@ -2447,4 +2456,4 @@ button[type=submit],
left: 50%;
transform: translateX(-50%);
width: auto;
}
}

0 comments on commit 5dc4521

Please sign in to comment.