Skip to content

Commit

Permalink
version 1.2.13
Browse files Browse the repository at this point in the history
  • Loading branch information
francgrasso committed Jul 8, 2020
1 parent eed74fc commit ddb006d
Show file tree
Hide file tree
Showing 10 changed files with 171 additions and 8 deletions.
38 changes: 38 additions & 0 deletions customizer-css.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ ul#sub-accordion-panel-yith_proteo_shop_options > li.panel-meta span.preview-not

#customize-control-yith_proteo_default_sidebar_position span.customize-inside-control-row,
#customize-control-yith_proteo_blog_page_sidebar_position span.customize-inside-control-row,
#customize-control-yith_proteo_blog_category_sidebar_position span.customize-inside-control-row,
#customize-control-yith_proteo_blog_tag_sidebar_position span.customize-inside-control-row,
#customize-control-yith_proteo_product_page_sidebar_position span.customize-inside-control-row,
#customize-control-yith_proteo_product_category_page_sidebar_position span.customize-inside-control-row,
#customize-control-yith_proteo_product_tag_page_sidebar_position span.customize-inside-control-row,
Expand All @@ -32,6 +34,12 @@ ul#sub-accordion-panel-yith_proteo_shop_options > li.panel-meta span.preview-not
#_customize-input-yith_proteo_blog_page_sidebar_position-radio-right,
#_customize-input-yith_proteo_blog_page_sidebar_position-radio-left,
#_customize-input-yith_proteo_blog_page_sidebar_position-radio-no-sidebar,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-right,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-left,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-no-sidebar,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-right,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-left,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-no-sidebar,
#_customize-input-yith_proteo_product_page_sidebar_position-radio-right,
#_customize-input-yith_proteo_product_page_sidebar_position-radio-left,
#_customize-input-yith_proteo_product_page_sidebar_position-radio-no-sidebar,
Expand All @@ -54,6 +62,12 @@ ul#sub-accordion-panel-yith_proteo_shop_options > li.panel-meta span.preview-not
#_customize-input-yith_proteo_blog_page_sidebar_position-radio-right + label,
#_customize-input-yith_proteo_blog_page_sidebar_position-radio-left + label,
#_customize-input-yith_proteo_blog_page_sidebar_position-radio-no-sidebar + label,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-right + label,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-left + label,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-no-sidebar + label,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-right + label,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-left + label,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-no-sidebar + label,
#_customize-input-yith_proteo_product_page_sidebar_position-radio-right + label,
#_customize-input-yith_proteo_product_page_sidebar_position-radio-left + label,
#_customize-input-yith_proteo_product_page_sidebar_position-radio-no-sidebar + label,
Expand All @@ -72,6 +86,8 @@ ul#sub-accordion-panel-yith_proteo_shop_options > li.panel-meta span.preview-not

#_customize-input-yith_proteo_default_sidebar_position-radio-right + label:before,
#_customize-input-yith_proteo_blog_page_sidebar_position-radio-right + label:before,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-right + label:before,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-right + label:before,
#_customize-input-yith_proteo_product_page_sidebar_position-radio-right + label:before,
#_customize-input-yith_proteo_product_category_page_sidebar_position-radio-right + label:before,
#_customize-input-yith_proteo_product_tag_page_sidebar_position-radio-right + label:before,
Expand All @@ -89,6 +105,8 @@ ul#sub-accordion-panel-yith_proteo_shop_options > li.panel-meta span.preview-not

#_customize-input-yith_proteo_default_sidebar_position-radio-left + label:before,
#_customize-input-yith_proteo_blog_page_sidebar_position-radio-left + label:before,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-left + label:before,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-left + label:before,
#_customize-input-yith_proteo_product_page_sidebar_position-radio-left + label:before,
#_customize-input-yith_proteo_product_category_page_sidebar_position-radio-left + label:before,
#_customize-input-yith_proteo_product_tag_page_sidebar_position-radio-left + label:before,
Expand All @@ -106,6 +124,8 @@ ul#sub-accordion-panel-yith_proteo_shop_options > li.panel-meta span.preview-not

#_customize-input-yith_proteo_default_sidebar_position-radio-no-sidebar + label:before,
#_customize-input-yith_proteo_blog_page_sidebar_position-radio-no-sidebar + label:before,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-no-sidebar + label:before,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-no-sidebar + label:before,
#_customize-input-yith_proteo_product_page_sidebar_position-radio-no-sidebar + label:before,
#_customize-input-yith_proteo_product_category_page_sidebar_position-radio-no-sidebar + label:before,
#_customize-input-yith_proteo_product_tag_page_sidebar_position-radio-no-sidebar + label:before,
Expand Down Expand Up @@ -133,6 +153,18 @@ ul#sub-accordion-panel-yith_proteo_shop_options > li.panel-meta span.preview-not
#_customize-input-yith_proteo_blog_page_sidebar_position-radio-right:hover + label:before,
#_customize-input-yith_proteo_blog_page_sidebar_position-radio-left:hover + label:before,
#_customize-input-yith_proteo_blog_page_sidebar_position-radio-no-sidebar:hover + label:before,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-right:checked + label:before,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-left:checked + label:before,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-no-sidebar:checked + label:before,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-right:hover + label:before,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-left:hover + label:before,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-no-sidebar:hover + label:before,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-right:checked + label:before,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-left:checked + label:before,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-no-sidebar:checked + label:before,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-right:hover + label:before,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-left:hover + label:before,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-no-sidebar:hover + label:before,
#_customize-input-yith_proteo_product_page_sidebar_position-radio-right:checked + label:before,
#_customize-input-yith_proteo_product_page_sidebar_position-radio-left:checked + label:before,
#_customize-input-yith_proteo_product_page_sidebar_position-radio-no-sidebar:checked + label:before,
Expand Down Expand Up @@ -166,6 +198,12 @@ ul#sub-accordion-panel-yith_proteo_shop_options > li.panel-meta span.preview-not
#_customize-input-yith_proteo_blog_page_sidebar_position-radio-right:checked + label,
#_customize-input-yith_proteo_blog_page_sidebar_position-radio-left:checked + label,
#_customize-input-yith_proteo_blog_page_sidebar_position-radio-no-sidebar:checked + label,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-right:checked + label,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-left:checked + label,
#_customize-input-yith_proteo_blog_category_sidebar_position-radio-no-sidebar:checked + label,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-right:checked + label,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-left:checked + label,
#_customize-input-yith_proteo_blog_tag_sidebar_position-radio-no-sidebar:checked + label,
#_customize-input-yith_proteo_product_page_sidebar_position-radio-right:checked + label,
#_customize-input-yith_proteo_product_page_sidebar_position-radio-left:checked + label,
#_customize-input-yith_proteo_product_page_sidebar_position-radio-no-sidebar:checked + label,
Expand Down
8 changes: 4 additions & 4 deletions inc/class-customizer-alpha-color-control.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ public function enqueue() {
* Render the control.
*/
public function render_content() {
// Output the label and description if they were passed in.
if ( isset( $this->label ) && '' !== $this->label ) {
echo '<span class="customize-control-title">' . esc_html( sanitize_text_field( $this->label ) ) . '</span>';
}
// Process the palette.
if ( is_array( $this->palette ) ) {
$palette = implode( '|', $this->palette );
Expand All @@ -88,10 +92,6 @@ public function render_content() {
// Begin the output. ?>
<label>
<?php
// Output the label and description if they were passed in.
if ( isset( $this->label ) && '' !== $this->label ) {
echo '<span class="customize-control-title">' . esc_html( sanitize_text_field( $this->label ) ) . '</span>';
}
if ( isset( $this->description ) && '' !== $this->description ) {
echo '<span class="description customize-control-description">' . esc_html( sanitize_text_field( $this->description ) ) . '</span>';
}
Expand Down
83 changes: 83 additions & 0 deletions inc/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,89 @@ function yith_proteo_customize_register( $wp_customize ) {
)
);

// Blog Category Management options.
$wp_customize->add_setting(
'yith_proteo_blog_category_sidebar_position',
array(
'default' => 'right',
'sanitize_callback' => 'yith_proteo_sanitize_sidebar_position',
)
);
$wp_customize->add_control(
'yith_proteo_blog_category_sidebar_position',
array(
'type' => 'radio',
'label' => esc_html__( 'Choose the position of blog category pages sidebar', 'yith-proteo' ),
'section' => 'yith_proteo_sidebar_management',
'description' => esc_html__( 'Select where to display the sidebar.', 'yith-proteo' ),
'choices' => array(
'no-sidebar' => esc_html__( 'No sidebar', 'yith-proteo' ),
'right' => esc_html__( 'Right', 'yith-proteo' ),
'left' => esc_html__( 'Left', 'yith-proteo' ),
),
)
);

// Blog Category Sidebar Chooser.
$wp_customize->add_setting(
'yith_proteo_blog_category_sidebar',
array(
'default' => 'blog-category-sidebar',
'sanitize_callback' => 'yith_proteo_sanitize_select',
)
);
$wp_customize->add_control(
'yith_proteo_blog_category_sidebar',
array(
'type' => 'select',
'label' => esc_html__( 'Choose blog category pages sidebar', 'yith-proteo' ),
'section' => 'yith_proteo_sidebar_management',
'description' => esc_html__( 'Select the sidebar to display.', 'yith-proteo' ),
'choices' => wp_list_pluck( $GLOBALS['wp_registered_sidebars'], 'name' ),
)
);

// Blog Tag Management options.
$wp_customize->add_setting(
'yith_proteo_blog_tag_sidebar_position',
array(
'default' => 'right',
'sanitize_callback' => 'yith_proteo_sanitize_sidebar_position',
)
);
$wp_customize->add_control(
'yith_proteo_blog_tag_sidebar_position',
array(
'type' => 'radio',
'label' => esc_html__( 'Choose the position of blog tag pages sidebar', 'yith-proteo' ),
'section' => 'yith_proteo_sidebar_management',
'description' => esc_html__( 'Select where to display the sidebar.', 'yith-proteo' ),
'choices' => array(
'no-sidebar' => esc_html__( 'No sidebar', 'yith-proteo' ),
'right' => esc_html__( 'Right', 'yith-proteo' ),
'left' => esc_html__( 'Left', 'yith-proteo' ),
),
)
);

// Blog Tag Sidebar Chooser.
$wp_customize->add_setting(
'yith_proteo_blog_tag_sidebar',
array(
'default' => 'blog-tag-sidebar',
'sanitize_callback' => 'yith_proteo_sanitize_select',
)
);
$wp_customize->add_control(
'yith_proteo_blog_tag_sidebar',
array(
'type' => 'select',
'label' => esc_html__( 'Choose blog tag pages sidebar', 'yith-proteo' ),
'section' => 'yith_proteo_sidebar_management',
'description' => esc_html__( 'Select the sidebar to display.', 'yith-proteo' ),
'choices' => wp_list_pluck( $GLOBALS['wp_registered_sidebars'], 'name' ),
)
);
/**
* Add topbar management.
*/
Expand Down
22 changes: 22 additions & 0 deletions inc/sidebars.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,28 @@ function yith_proteo_widgets_init() {
'after_title' => '</h2>',
)
);
register_sidebar(
array(
'name' => esc_html__( 'Blog category sidebar', 'yith-proteo' ),
'id' => 'blog-category-sidebar',
'description' => esc_html__( 'Add widgets here.', 'yith-proteo' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
)
);
register_sidebar(
array(
'name' => esc_html__( 'Blog tag sidebar', 'yith-proteo' ),
'id' => 'blog-tag-sidebar',
'description' => esc_html__( 'Add widgets here.', 'yith-proteo' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
)
);
}
endif;
add_action( 'widgets_init', 'yith_proteo_widgets_init' );
4 changes: 4 additions & 0 deletions inc/template-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ function yith_proteo_get_sidebar_position( $info = null ) {
// Check Blog page settings from customizer.
if ( is_home() ) {
$general_sidebar = get_theme_mod( 'yith_proteo_blog_page_sidebar_position', 'right' );
} elseif ( is_category() ) {
$general_sidebar = get_theme_mod( 'yith_proteo_blog_category_sidebar_position', 'right' );
} elseif ( is_tag() ) {
$general_sidebar = get_theme_mod( 'yith_proteo_blog_tag_sidebar_position', 'right' );
}

// Check WooCommerce Shop page settings.
Expand Down
2 changes: 1 addition & 1 deletion js/customizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
*/
(function($) {
(function ($) {

// Site title and description.
wp.customize('blogname', function (value) {
Expand Down
14 changes: 13 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: one-column, two-columns, left-sidebar, right-sidebar, wide-blocks, accessi
Requires at least: 4.9.6
Tested up to: WordPress 5.4
Requires PHP: 5.6
Stable tag: 1.2.12
Stable tag: 1.2.13
YITH Proteo WordPress Theme, Copyright 2020 YITH
YITH Proteo is distributed under the terms of the GNU GPL
License: GPLv2 or later
Expand All @@ -25,6 +25,18 @@ Proteo is a sleek, modern and "Gutenberg-friendly" e-commerce theme. Developed w
== Frequently Asked Questions ==

== Changelog ==
= 1.2.13 - July 08 2020 =
* Add Alpha Color Picker to theme customizer
* New option to force all products to use the same sidebar
* Add general sidebar management for blog categories and blog tags
* Experimental: lazy loading on loop product images
* Fix single product default sidebar behaviour
* Fix centered header layout issue when using custom logo
* Fix woocommerce label positioning in checkout pages
* Solve issue #5 opened by @design311 on github
* Remove reference to missing bootstrap .map file


= 1.2.12 - June 30 2020 =
* New option to set the default sidebar
* New cross sell products management options
Expand Down
2 changes: 1 addition & 1 deletion sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Author: YITH
Author URI: https://yithemes.com
Description: Proteo is a sleek, modern and “Gutenberg-friendly” e-commerce theme. Developed with a beautiful UI and a minimal design, is perfect for each kind of shop. Easy to manage and to customize, Proteo is the best solution if you want a complete e-commerce template and start quickly to sell your products with WooCommerce without a technical knowledge. Use it also for corporate site or a blog: there are no limits about what you can do with a beautiful and usable theme like this! Main features: Colors and Typography customization (Google font support), Logo customization, 3 different Header layouts, Advanced customizer theme options, Sidebar Management, Sidebar Chooser on each page and product, Page title icons, Top Bar Management, Easy main color shade chooser, Buttons style management (gradient buttons support), Footer management with multiple sidebars, WooCommerce support, Shop Theme Options, Custom WooCommerce messages and animated WooCommerce alert notices, Two cart page layouts, Bootstrap grid system, CSS animations, Gutenberg support, Responsive, Fullscreen search, Multilevel menus, Support to all YITH plugins, SVG icons for HiDPI screens, Translation Ready. <a href="https://proteo.yithemes.com/about-proteo/" rel="nofollow" target="_blank">Discover more ></a> | <a href="https://proteo.yithemes.com/" rel="nofollow" target="_blank">Check our live demo ></a>
Version: 1.2.12.3
Version: 1.2.13
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yith-proteo
Expand Down
4 changes: 4 additions & 0 deletions sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
dynamic_sidebar( get_theme_mod( 'yith_proteo_single_product_default_sidebar', 'shop-sidebar' ) );
} elseif ( ( is_single() || is_page() ) && 'inherit' === $sidebar ) {
dynamic_sidebar( get_theme_mod( 'yith_proteo_default_sidebar', 'sidebar-1' ) );
} elseif ( is_category() ) {
dynamic_sidebar( get_theme_mod( 'yith_proteo_blog_category_sidebar', 'sidebar-1' ) );
} elseif ( is_tag() ) {
dynamic_sidebar( get_theme_mod( 'yith_proteo_blog_tag_sidebar', 'sidebar-1' ) );
} elseif ( ! empty( $sidebar ) ) {
dynamic_sidebar( $sidebar );
} else {
Expand Down
2 changes: 1 addition & 1 deletion style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ddb006d

Please sign in to comment.