From c4dce4c296e9d1e30827e843aeaee5260830a31e Mon Sep 17 00:00:00 2001 From: rthvanesa Date: Wed, 20 Oct 2021 09:32:52 +0300 Subject: [PATCH 1/2] change theme dependency --- the-hanger-extender.php | 107 ++++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 53 deletions(-) diff --git a/the-hanger-extender.php b/the-hanger-extender.php index a5f41ec..05348de 100755 --- a/the-hanger-extender.php +++ b/the-hanger-extender.php @@ -10,7 +10,6 @@ * Tested up to: 5.8 * * @package The Hanger Extender - * @author GetBowtied */ if ( ! defined( 'ABSPATH' ) ) { @@ -18,20 +17,19 @@ } if ( ! function_exists( 'is_plugin_active' ) ) { - require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); + require_once ABSPATH . 'wp-admin/includes/plugin.php'; } global $theme; -$version = ( isset(get_plugin_data( __FILE__ )['Version']) && !empty(get_plugin_data( __FILE__ )['Version']) ) ? get_plugin_data( __FILE__ )['Version'] : '1.0'; -define ( 'TH_EXT_VERSION', $version ); +$version = ( isset( get_plugin_data( __FILE__ )['Version'] ) && ! empty( get_plugin_data( __FILE__ )['Version'] ) ) ? get_plugin_data( __FILE__ )['Version'] : '1.0'; +define( 'TH_EXT_VERSION', $version ); -/******************************************************************************/ -/* Plugin Updater *************************************************************/ -/******************************************************************************/ - -require( dirname( __FILE__ ) . '/core/updater/plugin-update-checker.php' ); -$myUpdateChecker = Puc_v4_Factory::buildUpdateChecker( +/* + * Plugin Updater + */ +require dirname( __FILE__ ) . '/core/updater/plugin-update-checker.php'; +$my_update_checker = Puc_v4_Factory::buildUpdateChecker( 'https://raw.githubusercontent.com/getbowtied/the-hanger-extender/master/core/updater/assets/plugin.json', __FILE__, 'the-hanger-extender' @@ -41,83 +39,86 @@ /** * TheHangerExtender class. - */ + */ class TheHangerExtender { /** * The single instance of the class. * * @var TheHangerExtender - */ - protected static $_instance = null; + */ + protected static $instance = null; /** * TheHangerExtender constructor. - * - */ + */ public function __construct() { - $theme = wp_get_theme(); + $theme = wp_get_theme(); $parent_theme = $theme->parent(); - // Helpers - include_once( dirname( __FILE__ ) . '/includes/helpers/helpers.php' ); + // Helpers. + include_once dirname( __FILE__ ) . '/includes/helpers/helpers.php'; - // Vendor - include_once( dirname( __FILE__ ) . '/includes/vendor/enqueue.php' ); + // Vendor. + include_once dirname( __FILE__ ) . '/includes/vendor/enqueue.php'; - if ( $theme->template == 'the-hanger') { - include_once( dirname( __FILE__ ) . '/includes/shortcodes/wp/slider.php' ); - include_once( dirname( __FILE__ ) . '/includes/shortcodes/wp/blog-posts.php' ); - include_once( dirname( __FILE__ ) . '/includes/shortcodes/wp/custom-button.php' ); - include_once( dirname( __FILE__ ) . '/includes/shortcodes/wc/woocommerce_products_user_bought.php' ); + // Include Theme Features. + if ( class_exists( 'GBT_Opt' ) || class_exists( 'GBTHELPERS' ) ) { + include_once dirname( __FILE__ ) . '/includes/shortcodes/wp/slider.php'; + include_once dirname( __FILE__ ) . '/includes/shortcodes/wp/blog-posts.php'; + include_once dirname( __FILE__ ) . '/includes/shortcodes/wp/custom-button.php'; + include_once dirname( __FILE__ ) . '/includes/shortcodes/wc/woocommerce_products_user_bought.php'; - // Add Shortcodes to VC - if ( defined( 'WPB_VC_VERSION' ) ) { + // Add Shortcodes to VC. + if ( defined( 'WPB_VC_VERSION' ) ) { - // Add new WP shortcodes to VC - include_once( dirname( __FILE__ ) . '/includes/shortcodes/vc/wp/slider.php' ); - include_once( dirname( __FILE__ ) . '/includes/shortcodes/vc/wp/blog-posts.php' ); - include_once( dirname( __FILE__ ) . '/includes/shortcodes/vc/wp/custom-button.php' ); + // Add new WP shortcodes to VC. + include_once dirname( __FILE__ ) . '/includes/shortcodes/vc/wp/slider.php'; + include_once dirname( __FILE__ ) . '/includes/shortcodes/vc/wp/blog-posts.php'; + include_once dirname( __FILE__ ) . '/includes/shortcodes/vc/wp/custom-button.php'; } } - // Blocks - include_once( dirname( __FILE__ ) . '/includes/gbt-blocks/index.php' ); + // Blocks. + include_once dirname( __FILE__ ) . '/includes/gbt-blocks/index.php'; - // Widgets - include_once( dirname( __FILE__ ) . '/includes/widgets/widget-ecommerce-info.php' ); - include_once( dirname( __FILE__ ) . '/includes/widgets/widget-product-categories-with-icon.php' ); + // Widgets. + include_once dirname( __FILE__ ) . '/includes/widgets/widget-ecommerce-info.php'; + include_once dirname( __FILE__ ) . '/includes/widgets/widget-product-categories-with-icon.php'; - // Customizer - include_once( dirname( __FILE__ ) . '/includes/customizer/repeater/class-th-ext-repeater-control.php' ); - include_once( dirname( __FILE__ ) . '/includes/customizer/toggle/class-control-toggle.php' ); + // Customizer. + include_once dirname( __FILE__ ) . '/includes/customizer/repeater/class-th-ext-repeater-control.php'; + include_once dirname( __FILE__ ) . '/includes/customizer/toggle/class-control-toggle.php'; - // Addons - include_once( dirname( __FILE__ ) . '/includes/addons/woocommerce-category-header.php' ); - include_once( dirname( __FILE__ ) . '/includes/addons/woocommerce-category-icon.php' ); + // Addons. + include_once dirname( __FILE__ ) . '/includes/addons/woocommerce-category-header.php'; + include_once dirname( __FILE__ ) . '/includes/addons/woocommerce-category-icon.php'; - // Social Media - include_once( dirname( __FILE__ ) . '/includes/social-media/class-social-media.php' ); + // Social Media. + include_once dirname( __FILE__ ) . '/includes/social-media/class-social-media.php'; - // Social Sharing - include_once( dirname( __FILE__ ) . '/includes/social-sharing/class-social-sharing.php' ); + // Social Sharing. + include_once dirname( __FILE__ ) . '/includes/social-sharing/class-social-sharing.php'; } /** * Ensures only one instance of TheHangerExtender is loaded or can be loaded. * * @return TheHangerExtender - */ + */ public static function instance() { - if ( is_null( self::$_instance ) ) { - self::$_instance = new self(); + if ( is_null( self::$instance ) ) { + self::$instance = new self(); } - return self::$_instance; + return self::$instance; } } endif; -add_action( 'after_setup_theme', function() { - $thehanger_extender = new TheHangerExtender; -} ); +add_action( + 'after_setup_theme', + function() { + $thehanger_extender = new TheHangerExtender(); + } +); From 68cb8852f7ff2c9bce6d25c437bbeda4318bcbe0 Mon Sep 17 00:00:00 2001 From: rthvanesa Date: Wed, 20 Oct 2021 09:35:11 +0300 Subject: [PATCH 2/2] v.1.7.3 --- README.txt | 9 ++++++--- core/updater/assets/plugin.json | 8 ++++---- the-hanger-extender.php | 4 ++-- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/README.txt b/README.txt index e7d77b6..26b8609 100644 --- a/README.txt +++ b/README.txt @@ -2,12 +2,12 @@ Contributors: getbowtied, vanesareinerth, adrianlbs, traians Tags: gutenberg, blocks Requires at least: 5.0 -Tested up to: 5.8 -Stable tag: 1.7.2 +Tested up to: 5.8.1 +Stable tag: 1.7.3 Requires PHP: 5.5.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html -~Current Version:1.7.2~ +~Current Version:1.7.3~ Extends the functionality of The Hanger theme by adding theme specific features. @@ -37,6 +37,9 @@ Companion plugin for the **The Hanger** theme. Extends the functionality by addi == Changelog == += 1.7.3 = +- WordPress 5.8.1 compatibility updates + = 1.7.2 = - WordPress 5.8 compatibility updates diff --git a/core/updater/assets/plugin.json b/core/updater/assets/plugin.json index 7cb5c11..52c2264 100755 --- a/core/updater/assets/plugin.json +++ b/core/updater/assets/plugin.json @@ -1,19 +1,19 @@ { "name": "The Hanger Extender", - "version": "1.7.2", + "version": "1.7.3", "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.8", - "last_updated": "2021-09-06 14:00:00", + "tested": "5.8.1", + "last_updated": "2021-10-20 09:00:00", "author": "GetBowtied", "author_homepage": "https://getbowtied.com/", "sections": { "description": "

Companion plugin for the The Hanger theme. Extends the functionality by adding theme specific features.

Gutenberg Blocks:

WPBakery Page Builder Elements:

Widgets:

Features:

", - "changelog": "

1.7.2

1.7.1

1.7.0

1.6.9

1.6.8

1.6.7

1.6.6

1.6.5

1.6.4

1.6.3

1.6.2

1.6.1

1.6.0

1.5.9

1.5.8

1.5.7

1.5.6

1.5.5

1.5.4

1.5.3

1.5.2

1.5.1

1.5

1.4

1.3

1.2

1.1

1.0

" + "changelog": "

1.7.3

1.7.2

1.7.1

1.7.0

1.6.9

1.6.8

1.6.7

1.6.6

1.6.5

1.6.4

1.6.3

1.6.2

1.6.1

1.6.0

1.5.9

1.5.8

1.5.7

1.5.6

1.5.5

1.5.4

1.5.3

1.5.2

1.5.1

1.5

1.4

1.3

1.2

1.1

1.0

" }, "icons" : { diff --git a/the-hanger-extender.php b/the-hanger-extender.php index 05348de..c6dd184 100755 --- a/the-hanger-extender.php +++ b/the-hanger-extender.php @@ -3,11 +3,11 @@ * Plugin Name: The Hanger Extender * Plugin URI: https://thehanger.wp-theme.design/ * Description: Extends the functionality of The Hanger with theme specific shortcodes and page builder elements. - * Version: 1.7.2 + * Version: 1.7.3 * Author: GetBowtied * Author URI: https://getbowtied.com * Requires at least: 5.0 - * Tested up to: 5.8 + * Tested up to: 5.8.1 * * @package The Hanger Extender */