Skip to content

Commit

Permalink
Merge pull request #3 from getbowtied/develop
Browse files Browse the repository at this point in the history
v.1.7.3
  • Loading branch information
rthvanesa authored Oct 20, 2021
2 parents ddc98df + 68cb885 commit dfe988c
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 62 deletions.
9 changes: 6 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.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.

Expand Down Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 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.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": "<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 Media' section in Customizer for easy management of links to social media profiles</li><li>Adds social sharing options for the product page and blog post</li><li>Display recently purchased products in My Account / Dashboard</li><li>Adds header image and icon options for WooCommerce product categories</li></ul>",
"changelog": "<h4>1.7.2</h4><ul><li>WordPress 5.8 compatibility updates</li></ul><h4>1.7.1</h4><ul><li>Small maintenance updates</li></ul><h4>1.7.0</h4><ul><li>Small maintenance updates</li></ul><h4>1.6.9</h4><ul><li>Fixed: Product category icon picker issue</li><li>Maintenance: Fixed a few jQuery deprecated features warnings</li></ul><h4>1.6.8</h4><ul><li>Maintenance: Updated Swiper library to its latest version</li></ul><h4>1.6.7</h4><ul><li>WordPress 5.5 compatibility updates</li></ul><h4>1.6.6</h4><ul><li>New: Option to show/hide product's social sharing buttons</li><li>New: Social Media Customizer Control that allows for custom Icons and Social Profile links</li><li>Fixed: eCommerce Info Widget customizer warnings</li></ul><h4>1.6.5</h4><ul><li>Small maintenance updates</li></ul><h4>1.6.4</h4><ul><li>Added 'alt' attribute to Product Category Header's image</li></ul><h4>1.6.3</h4><ul><li>Fixed: Product categories with icon widget - error when icons are disabled</li><li>WordPress 5.3.1 compatibility updates</li></ul><h4>1.6.2</h4><ul><li>WordPress 5.3 compatibility updates</li></ul><h4>1.6.1</h4><ul><li>Fixed: Social Sharing buttons display issue on smaller screens</li></ul><h4>1.6.0</h4><ul><li>WordPress 5.3 compatibility updates</li><li>Slider block style adjustments</li></ul><h4>1.5.9</h4><ul><li>WPBakery Page Builder: Added Slider element font size options</li><li>Blocks: Added Slider block font size options</li></ul><h4>1.5.8</h4><ul><li>Small maintenance updates</li></ul><h4>1.5.7</h4><ul><li>Adds: the 'Social Media' section in Customizer allowing for easy management of links to social media profiles. The icons can be turned on/off in the Top Bar or displayed in pages using the Gutenberg Block (functionality transferred from the theme)</li><li>Adds: Upload header images and icons for WooCommerce product categories (functionality transferred from the theme)</li></ul><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>"
"changelog": "<h4>1.7.3</h4><ul><li>WordPress 5.8.1 compatibility updates</li></ul><h4>1.7.2</h4><ul><li>WordPress 5.8 compatibility updates</li></ul><h4>1.7.1</h4><ul><li>Small maintenance updates</li></ul><h4>1.7.0</h4><ul><li>Small maintenance updates</li></ul><h4>1.6.9</h4><ul><li>Fixed: Product category icon picker issue</li><li>Maintenance: Fixed a few jQuery deprecated features warnings</li></ul><h4>1.6.8</h4><ul><li>Maintenance: Updated Swiper library to its latest version</li></ul><h4>1.6.7</h4><ul><li>WordPress 5.5 compatibility updates</li></ul><h4>1.6.6</h4><ul><li>New: Option to show/hide product's social sharing buttons</li><li>New: Social Media Customizer Control that allows for custom Icons and Social Profile links</li><li>Fixed: eCommerce Info Widget customizer warnings</li></ul><h4>1.6.5</h4><ul><li>Small maintenance updates</li></ul><h4>1.6.4</h4><ul><li>Added 'alt' attribute to Product Category Header's image</li></ul><h4>1.6.3</h4><ul><li>Fixed: Product categories with icon widget - error when icons are disabled</li><li>WordPress 5.3.1 compatibility updates</li></ul><h4>1.6.2</h4><ul><li>WordPress 5.3 compatibility updates</li></ul><h4>1.6.1</h4><ul><li>Fixed: Social Sharing buttons display issue on smaller screens</li></ul><h4>1.6.0</h4><ul><li>WordPress 5.3 compatibility updates</li><li>Slider block style adjustments</li></ul><h4>1.5.9</h4><ul><li>WPBakery Page Builder: Added Slider element font size options</li><li>Blocks: Added Slider block font size options</li></ul><h4>1.5.8</h4><ul><li>Small maintenance updates</li></ul><h4>1.5.7</h4><ul><li>Adds: the 'Social Media' section in Customizer allowing for easy management of links to social media profiles. The icons can be turned on/off in the Top Bar or displayed in pages using the Gutenberg Block (functionality transferred from the theme)</li><li>Adds: Upload header images and icons for WooCommerce product categories (functionality transferred from the theme)</li></ul><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
111 changes: 56 additions & 55 deletions the-hanger-extender.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,33 @@
* 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
* @author GetBowtied
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

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'
Expand All @@ -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();
}
);

0 comments on commit dfe988c

Please sign in to comment.