Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanesa Reinerth committed May 29, 2019
2 parents ae7c638 + 8c2b8ff commit 5a091a5
Show file tree
Hide file tree
Showing 12 changed files with 913 additions and 82 deletions.
13 changes: 10 additions & 3 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Contributors: getbowtied, vanesareinerth, adrianlbs, traians
Tags: gutenberg, blocks
Requires at least: 5.0
Tested up to: 5.2
Stable tag: 1.5.5
Tested up to: 5.2.1
Stable tag: 1.5.6
Requires PHP: 5.5.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
~Current Version:1.5.5~
~Current Version:1.5.6~

Extends the functionality of The Hanger theme by adding theme specific features.

Expand All @@ -25,12 +25,19 @@ Companion plugin for the **The Hanger** theme. Extends the functionality by addi
- Blog Posts
- Custom Button

**Widgets:**
- eCommerce Info
- Product Categories with Icon

**Features:**
- Adds social sharing options for the product page
- Display recently purchased products in My Account / Dashboard

== Changelog ==

= 1.5.6 =
- Adds: Theme-specific custom widgets: eCommerce Info and Product Categories with Icon

= 1.5.5 =
- PHP 7.3 compatibility updates

Expand Down
10 changes: 5 additions & 5 deletions core/updater/assets/plugin.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"name": "The Hanger Extender",
"version": "1.5.5",
"version": "1.5.6",
"download_url": "https://github.com/getbowtied/the-hanger-extender/zipball/master",

"homepage": "https://themeforest.net/item/the-hanger-modern-classic-woocommerce-theme/21753302",
"requires": "5.0",
"tested": "5.2",
"last_updated": "2019-05-21 12:00:00",
"tested": "5.2.1",
"last_updated": "2019-05-29 15:00:00",

"author": "GetBowtied",
"author_homepage": "https://getbowtied.com/",

"sections": {
"description": "<p>Companion plugin for the <b>The Hanger</b> theme. Extends the functionality by adding theme specific features.</p><h4>Gutenberg Blocks:</h4><ul><li>Image Slider</li><li>Blog Posts</li><li>Social Media Profiles</li></ul><h4>WPBakery Page Builder Elements:</h4><ul><li>Slider</li><li>Blog Posts</li><li>Custom Button</li></ul><h4>Features:</h4><ul><li>Adds social sharing options for the product page</li><li>Display recently purchased products in My Account / Dashboard</li></ul>",
"changelog": "<h4>1.5.5</h4><ul><li>Fixed: PHP 7.3 compatibility updates</li></ul><h4>1.5.4</h4><ul><li>Fixed: Localization issues</li></ul><h4>1.5.3</h4><ul><li>WordPress 5.1 compatibility improvements</li></ul><h4>1.5.2</h4><ul><li>Various bug fixes</li></ul><h4>1.5.1</h4><ul><li>Fixed: Columns Block displaying issue</li><li>Fixed: Yoast SEO compatibiity issue</li></ul><h4>1.5</h4><ul><li>WordPress 5+ compatibility improvements</li><li>Improved styles for theme neutrality</li><li>Localization issues with the Posts Grid Block</li></ul><h4>1.4</h4><ul><li>WordPress 5+ compatibility improvements</li></ul><h4>1.3</h4><ul><li>Gutenberg Slider Block Fixes</li></ul><h4>1.2</h4><ul><li>Gutenberg Compatibility</li><li>Gutenberg Custom Blocks: Slider, Latest Posts Grid, Social Media Profiles</li></ul><h4>1.1</h4><ul><li>Various Fixes</li></ul><h4>1.0</h4><ul><li>Initial Version</li></ul>"
"description": "<p>Companion plugin for the <b>The Hanger</b> theme. Extends the functionality by adding theme specific features.</p><h4>Gutenberg Blocks:</h4><ul><li>Image Slider</li><li>Blog Posts</li><li>Social Media Profiles</li></ul><h4>WPBakery Page Builder Elements:</h4><ul><li>Slider</li><li>Blog Posts</li><li>Custom Button</li></ul><h4>Widgets:</h4><ul><li>eCommerce Info</li><li>Product Categories with Icon</li></ul><h4>Features:</h4><ul><li>Adds social sharing options for the product page</li><li>Display recently purchased products in My Account / Dashboard</li></ul>",
"changelog": "<h4>1.5.6</h4><ul><li>Adds: Theme-specific custom widgets: eCommerce Info and Product Categories with Icon</li></ul><h4>1.5.5</h4><ul><li>Fixed: PHP 7.3 compatibility updates</li></ul><h4>1.5.4</h4><ul><li>Fixed: Localization issues</li></ul><h4>1.5.3</h4><ul><li>WordPress 5.1 compatibility improvements</li></ul><h4>1.5.2</h4><ul><li>Various bug fixes</li></ul><h4>1.5.1</h4><ul><li>Fixed: Columns Block displaying issue</li><li>Fixed: Yoast SEO compatibiity issue</li></ul><h4>1.5</h4><ul><li>WordPress 5+ compatibility improvements</li><li>Improved styles for theme neutrality</li><li>Localization issues with the Posts Grid Block</li></ul><h4>1.4</h4><ul><li>WordPress 5+ compatibility improvements</li></ul><h4>1.3</h4><ul><li>Gutenberg Slider Block Fixes</li></ul><h4>1.2</h4><ul><li>Gutenberg Compatibility</li><li>Gutenberg Custom Blocks: Slider, Latest Posts Grid, Social Media Profiles</li></ul><h4>1.1</h4><ul><li>Various Fixes</li></ul><h4>1.0</h4><ul><li>Initial Version</li></ul>"
},

"icons" : {
Expand Down
23 changes: 23 additions & 0 deletions includes/helpers/helpers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

if( !function_exists('gbt_th_theme_warning') ) {
function gbt_th_theme_warning() {

?>

<div class="error">
<p>The Hanger Extender plugin couldn't find the Block Editor (Gutenberg) on this site. It requires WordPress 5+ or Gutenberg installed as a plugin.</p>
</div>

<?php
}
}

if( !function_exists('is_wp_version') ) {
function is_wp_version( $operator, $version ) {

global $wp_version;

return version_compare( $wp_version, $version, $operator );
}
}
19 changes: 19 additions & 0 deletions includes/widgets/assets/css/widget-ecommerce-info.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.widget_theme_ecommerce_info {
display: -webkit-box;
display: -ms-flexbox;
display: flex; }
.widget_theme_ecommerce_info .ecommerce-info-widget-txt-wrapper .ecommerce-info-widget-title {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center; }
.widget_theme_ecommerce_info .ecommerce-info-widget-txt-wrapper .ecommerce-info-widget-title .ecommerce-info-widget-icon {
font-size: 24px;
margin-right: 16px;
line-height: 1; }
.widget_theme_ecommerce_info .ecommerce-info-widget-txt-wrapper .ecommerce-info-widget-title .widget-title {
margin-bottom: 4px; }
.widget_theme_ecommerce_info .ecommerce-info-widget-txt-wrapper .ecommerce-info-widget-subtitle {
padding-left: 2.5rem; }
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > li {
border-bottom: 1px solid;
margin: 0;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
cursor: pointer; }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > li:last-child {
border-bottom: 0; }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > li .dropdown_icon:before {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: end;
-ms-flex-pack: end;
justify-content: flex-end;
-webkit-transition: -webkit-transform .7s;
transition: -webkit-transform .7s;
-o-transition: transform .7s;
transition: transform .7s;
transition: transform .7s, -webkit-transform .7s; }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > li.active-item .dropdown_icon:before {
-webkit-transform: rotateX(180deg) rotateY(0deg) rotateZ(0deg);
transform: rotateX(180deg) rotateY(0deg) rotateZ(0deg); }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > li > ul.children {
margin: 0px 0.5rem 1rem 2.5rem;
width: 100%; }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > li > ul.children.add_scroll {
max-height: 200px;
overflow-y: scroll;
margin-bottom: 1.5rem; }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > li > ul.children.add_scroll::-webkit-scrollbar-track {
border-radius: 3px;
background: rgba(0, 0, 0, 0.1); }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > li > ul.children.add_scroll::-webkit-scrollbar {
width: 2px;
background: rgba(0, 0, 0, 0.1); }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > li > ul.children.add_scroll::-webkit-scrollbar-thumb {
border-radius: 3px;
background: rgba(0, 0, 0, 0.1); }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > li > ul.children li [class^="thehanger-icons-"],
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > li > ul.children li [class*=" thehanger-icons-"] {
display: none; }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > li > a {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
min-height: 4.5em;
padding-top: 1.2em;
padding-bottom: 1.2em;
max-width: 70%; }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > li > a i {
font-size: 1.5rem;
padding-right: 0.9375rem; }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > li > a img {
width: 1.5rem;
margin-right: 0.9375rem; }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > li .count {
margin-left: 0.1875rem; }

.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > .cat-parent {
position: relative; }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > .cat-parent.no-icon > .children {
margin-left: 1.25rem; }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > .cat-parent.current-cat-parent.active ul.children {
display: block; }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > .cat-parent .dropdown_icon {
-webkit-transition: all .3s ease-in-out;
-o-transition: all .3s ease-in-out;
transition: all .3s ease-in-out;
padding: 0.25rem;
font-size: 0.5rem;
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
-webkit-box-pack: end;
-ms-flex-pack: end;
justify-content: flex-end;
text-align: right; }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > .cat-parent .cat-item {
margin-bottom: 0.3125rem; }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > .cat-parent > .children {
display: none; }
.widget.woocommerce.widget_product_categories_with_icon .product-categories-with-icon > .cat-parent > .children li ul.children {
margin: 0.5rem 0.5rem 0px 1.25rem; }
41 changes: 41 additions & 0 deletions includes/widgets/assets/js/widget-product-categories-with-icon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
jQuery(function($) {

"use strict";

$('.product-categories-with-icon').on('click', '.cat-parent .dropdown_icon', function() {
$(this).parent().toggleClass('active-item');
$(this).siblings("ul.children").slideToggle('300', function() {
});
});

// If there is more than 8 categories than add scroll class
// If the user is inside the category, keep the widget category open

$('.product-categories-with-icon .cat-item').each(function() {

var max_subcategory_nr = 8
var subcategory_nr = $(this).find("ul.children").find('li').length;

if ( subcategory_nr > max_subcategory_nr ) {
$(this).find("ul.children").addClass('add_scroll');
}

if ( $(this).hasClass('current-cat') ) {
$(this).addClass('active-item');
$(this).find("ul.children").show();
}

if ( $(this).hasClass('current-cat-parent') ) {
$(this).addClass('active-item');
$(this).find("ul.children").show();
}

if ( $(this).hasClass('cat-parent') ) {
if ( ! $(this).find('i').length ) {
$(this).addClass('no-icon');
}
}

});

});
31 changes: 31 additions & 0 deletions includes/widgets/assets/scss/widget-ecommerce-info.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.widget_theme_ecommerce_info
{
display: flex;

.ecommerce-info-widget-txt-wrapper
{
.ecommerce-info-widget-title
{
display: flex;
align-items: center;

.ecommerce-info-widget-icon
{
font-size: 24px;
margin-right: 16px;
line-height: 1;
}

.widget-title
{
margin-bottom: 4px;
}
}

.ecommerce-info-widget-subtitle
{
padding-left: 2.5rem;
}
}

}
Loading

0 comments on commit 5a091a5

Please sign in to comment.