Plugin Directory

Changeset 3426838


Ignore:
Timestamp:
12/24/2025 12:38:11 PM (3 months ago)
Author:
devitemsllc
Message:

Update to version 3.0.4 from GitHub

Location:
ht-mega-for-elementor
Files:
2 added
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ht-mega-for-elementor/tags/3.0.4/admin/admin-init.php

    r3383050 r3426838  
    3939        require_once ('include/class.library-source.php' );
    4040        require_once( 'include/class.dynamic-notice.php' ); // dynamic notice file
     41        require_once( 'include/class-notice-manager.php' ); // notice manager file
    4142        require_once( HTMEGA_ADDONS_PL_PATH.'includes/class.api.php' );
    4243        if( ! class_exists( 'HTMega_Settings_API' ) ) {
  • ht-mega-for-elementor/tags/3.0.4/admin/include/settings-panel/includes/templates/sidebar-banner.php

    r3328677 r3426838  
    1414    }
    1515
    16     if (class_exists('HTMega_Template_Library')) {
    17         $template_data = HTMega_Template_Library::instance()->get_templates_info();
    18        
     16    if (class_exists('HTMega_Notice_Manager')) {
     17        // showing sidbar  through the remote api
     18        $noticeManager = HTMega_Notice_Manager::instance();
     19        $notices = $noticeManager->get_sidebar_info();
    1920        if (is_plugin_active('htmega-pro/htmega_pro.php')) {
    2021            $htmega_license_title = apply_filters('htmega_license_title', 'lifetime');
    2122            if (!str_contains($htmega_license_title, 'Growth') && !str_contains($htmega_license_title, 'Unlimited - Lifetime')) {
    22                 if (isset($template_data['notices']['sidebar'][1]['status']) && !empty($template_data['notices']['sidebar'][1]['status'])) {
     23                if (isset($notices[1]['status']) && !empty($notices[1]['status']) && !empty($notices[1]['bannerimage']) ) {
    2324                    ?>
    2425                    <div class="htmega-opt-sidebar-item htmega-opt-banner-image">
    25                         <a href="<?php echo esc_url($template_data['notices']['sidebar'][1]['bannerlink']); ?>" target="_blank">
    26                             <img class="htoptions-banner-img" src="<?php echo esc_url($template_data['notices']['sidebar'][1]['bannerimage']); ?>" alt="<?php echo esc_attr__('HT Mega Addons', 'htmega-addons'); ?>"/>
     26                        <a href="<?php echo esc_url($notices[1]['bannerlink']); ?>" target="_blank">
     27                            <img class="htoptions-banner-img" src="<?php echo esc_url($notices[1]['bannerimage']); ?>" alt="<?php echo esc_attr__('HT Mega Addons', 'htmega-addons'); ?>"/>
    2728                        </a>
    2829                    </div>
     
    3132            }
    3233        } else {
    33             if (isset($template_data['notices']['sidebar'][0]['status']) && !empty($template_data['notices']['sidebar'][0]['status'])) {
     34            if (isset($notices[0]['status']) && !empty($notices[0]['status']) && !empty($notices[0]['bannerimage']) ) {
    3435                ?>
    3536                <div class="htmega-opt-sidebar-item htmega-opt-banner-image">
    36                     <a href="<?php echo esc_url($template_data['notices']['sidebar'][0]['bannerlink']); ?>" target="_blank">
    37                         <img class="htoptions-banner-img" src="<?php echo esc_url($template_data['notices']['sidebar'][0]['bannerimage']); ?>" alt="<?php echo esc_attr__('HT Mega Addons', 'htmega-addons'); ?>"/>
     37                    <a href="<?php echo esc_url($notices[0]['bannerlink']); ?>" target="_blank">
     38                        <img class="htoptions-banner-img" src="<?php echo esc_url($notices[0]['bannerimage']); ?>" alt="<?php echo esc_attr__('HT Mega Addons', 'htmega-addons'); ?>"/>
    3839                    </a>
    3940                </div>
  • ht-mega-for-elementor/tags/3.0.4/htmega_addons_elementor.php

    r3425025 r3426838  
    66 * Author:      HasThemes
    77 * Author URI:  https://hasthemes.com/
    8  * Version:     3.0.3
     8 * Version:     3.0.4
    99 * License:     GPL2
    1010 * License URI:  https://www.gnu.org/licenses/gpl-2.0.html
    1111 * Text Domain: htmega-addons
    1212 * Domain Path: /languages
    13  * Elementor tested up to: 3.33.6
    14  * Elementor Pro tested up to: 3.33.2
     13 * Elementor tested up to: 3.34.0
     14 * Elementor Pro tested up to: 3.34.0
    1515*/
    1616
    1717if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly
    18 define( 'HTMEGA_VERSION', '3.0.3' );
     18define( 'HTMEGA_VERSION', '3.0.4' );
    1919define( 'HTMEGA_ADDONS_PL_ROOT', __FILE__ );
    2020define( 'HTMEGA_ADDONS_PL_URL', plugins_url( '/', HTMEGA_ADDONS_PL_ROOT ) );
  • ht-mega-for-elementor/tags/3.0.4/includes/class.htmega.php

    r3394916 r3426838  
    9898        add_filter('plugin_action_links_'.HTMEGA_ADDONS_PLUGIN_BASE, [ $this, 'plugins_setting_links' ] );
    9999        add_filter( 'plugin_row_meta', [ $this, 'htmega_plugin_row_meta' ], 10, 4 );
    100 
    101           /**
    102          * [$template_info] Assign template data
    103          * @var [type]
    104          */
    105         if( is_admin() && class_exists('\HTMega_Template_Library') ){
    106             self::$template_info = \HTMega_Template_Library::instance()->get_templates_info();
    107         }
    108100    }
    109101
     
    163155            // Admin Notices
    164156            add_action( 'admin_head', [ $this, 'admin_rating_notice' ] );
    165             //add_action( 'admin_head', [ $this, 'admin_halloween_notice' ] );
    166157            add_action( 'admin_head', [ $this, 'admin_promo_notice' ] );
    167158            if ( is_plugin_active('htmega-pro/htmega_pro.php' ) ) {
     
    329320            return;
    330321        }
    331    
    332         if( !isset( self::$template_info['notices'] ) || !is_array( self::$template_info['notices'] ) ){
    333             return;
    334         }
    335        
    336         if( isset( self::$template_info['notices']['banner'][0]['status'] ) ){
    337            
    338             if( self::$template_info['notices']['banner'][0]['status'] == 0 ){
    339                 return;
    340             }
    341         }else{
    342             return;
    343         }
    344 
    345         // Fetch data
    346         $bannerLink = self::$template_info['notices']['banner'][0]['bannerlink'] ? self::$template_info['notices']['banner'][0]['bannerlink'] : '#';
    347         $bannerTitle = self::$template_info['notices']['banner'][0]['title'] ? self::$template_info['notices']['banner'][0]['title'] : esc_html__('Promo Banner','htmega-addons');
    348         $bannerDescription = self::$template_info['notices']['banner'][0]['description'] ? self::$template_info['notices']['banner'][0]['description'] : '';
    349         $bannerImage = self::$template_info['notices']['banner'][0]['bannerimage'] ? '<img src="'.esc_url(self::$template_info['notices']['banner'][0]['bannerimage']).'" alt="'.esc_attr($bannerTitle).'"/>' : '';
    350 
    351         $banner['image'] = $bannerImage;
    352         $banner['url'] = $bannerLink;
    353         \HasTech_Notices::set_notice(
    354             [
    355                 'id'          => 'htmega-promotional-banner',
    356                 'type'        => 'info',
    357                 'dismissible' => true,
    358                 'message'     => $bannerDescription,
    359                 'banner'      => $banner,
    360                 'close_by'    => 'transient',
    361                 'priority'    => 2,
    362             ]
    363         );
    364            
    365     }
    366 
    367 
    368     /**
    369      * Halloween Notice
    370      *
    371      * @return void
    372      */
    373     public function admin_halloween_notice(){
    374         $plugins = get_plugins();
    375 
    376         if ( is_plugin_active('htmega-pro/htmega_pro.php' ) ) {
    377             return;
    378         }
    379         $url = 'https://wphtmega.com/pricing/?utm_source=admin&utm_medium=dashboard&utm_campaign=halloween';
    380         $image = HTMEGA_ADDONS_PL_URL . 'admin/assets/images/htmega-halloween.png';
    381 
    382    
    383         \HasTech_Notices::set_notice(
    384             [
    385                 'id'          => 'htmega-halloween-notice',
    386                 'type'        => 'notice',
    387                 'dismissible' => true,
    388                 'message_type' => 'banner',
    389                 'banner' => [
    390                     'url' => esc_url_raw($url),
    391                     'image' => '<img src="'.esc_url($image).'" alt="'. esc_html("HT Mega",'htmega-addons') . '" style="max-width:100%"/>'
    392                 ],
    393                 'close_by'    => 'transient'
    394             ]
    395         );
    396     }
     322        // showing notice through the remote api
     323        $noticeManager = HTMega_Notice_Manager::instance();
     324        $notices = $noticeManager->get_notices_info();
     325        if(!empty($notices)) {
     326            foreach ($notices as $notice) {
     327                if(empty($notice['disable'])) {
     328                    HasTech_Notices::set_notice($notice);
     329                }
     330            }
     331        }
     332    }
     333
    397334
    398335    /**
  • ht-mega-for-elementor/tags/3.0.4/readme.txt

    r3425025 r3426838  
    44Requires at least: 5.0
    55Tested up to: 6.9
    6 Stable tag: 3.0.3
     6Stable tag: 3.0.4
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    238238== Changelog ==
    239239
     240= Version 3.0.4 - Date: 2025-12-24 =
     241* Fixed: Template library request issue.
     242* Tested: Compatibility with the latest version of Elementor.
     243
    240244= Version 3.0.3 - Date: 2025-12-22 =
    241245* Fixed: Library transient size issue.
  • ht-mega-for-elementor/trunk/admin/admin-init.php

    r3383050 r3426838  
    3939        require_once ('include/class.library-source.php' );
    4040        require_once( 'include/class.dynamic-notice.php' ); // dynamic notice file
     41        require_once( 'include/class-notice-manager.php' ); // notice manager file
    4142        require_once( HTMEGA_ADDONS_PL_PATH.'includes/class.api.php' );
    4243        if( ! class_exists( 'HTMega_Settings_API' ) ) {
  • ht-mega-for-elementor/trunk/admin/include/settings-panel/includes/templates/sidebar-banner.php

    r3328677 r3426838  
    1414    }
    1515
    16     if (class_exists('HTMega_Template_Library')) {
    17         $template_data = HTMega_Template_Library::instance()->get_templates_info();
    18        
     16    if (class_exists('HTMega_Notice_Manager')) {
     17        // showing sidbar  through the remote api
     18        $noticeManager = HTMega_Notice_Manager::instance();
     19        $notices = $noticeManager->get_sidebar_info();
    1920        if (is_plugin_active('htmega-pro/htmega_pro.php')) {
    2021            $htmega_license_title = apply_filters('htmega_license_title', 'lifetime');
    2122            if (!str_contains($htmega_license_title, 'Growth') && !str_contains($htmega_license_title, 'Unlimited - Lifetime')) {
    22                 if (isset($template_data['notices']['sidebar'][1]['status']) && !empty($template_data['notices']['sidebar'][1]['status'])) {
     23                if (isset($notices[1]['status']) && !empty($notices[1]['status']) && !empty($notices[1]['bannerimage']) ) {
    2324                    ?>
    2425                    <div class="htmega-opt-sidebar-item htmega-opt-banner-image">
    25                         <a href="<?php echo esc_url($template_data['notices']['sidebar'][1]['bannerlink']); ?>" target="_blank">
    26                             <img class="htoptions-banner-img" src="<?php echo esc_url($template_data['notices']['sidebar'][1]['bannerimage']); ?>" alt="<?php echo esc_attr__('HT Mega Addons', 'htmega-addons'); ?>"/>
     26                        <a href="<?php echo esc_url($notices[1]['bannerlink']); ?>" target="_blank">
     27                            <img class="htoptions-banner-img" src="<?php echo esc_url($notices[1]['bannerimage']); ?>" alt="<?php echo esc_attr__('HT Mega Addons', 'htmega-addons'); ?>"/>
    2728                        </a>
    2829                    </div>
     
    3132            }
    3233        } else {
    33             if (isset($template_data['notices']['sidebar'][0]['status']) && !empty($template_data['notices']['sidebar'][0]['status'])) {
     34            if (isset($notices[0]['status']) && !empty($notices[0]['status']) && !empty($notices[0]['bannerimage']) ) {
    3435                ?>
    3536                <div class="htmega-opt-sidebar-item htmega-opt-banner-image">
    36                     <a href="<?php echo esc_url($template_data['notices']['sidebar'][0]['bannerlink']); ?>" target="_blank">
    37                         <img class="htoptions-banner-img" src="<?php echo esc_url($template_data['notices']['sidebar'][0]['bannerimage']); ?>" alt="<?php echo esc_attr__('HT Mega Addons', 'htmega-addons'); ?>"/>
     37                    <a href="<?php echo esc_url($notices[0]['bannerlink']); ?>" target="_blank">
     38                        <img class="htoptions-banner-img" src="<?php echo esc_url($notices[0]['bannerimage']); ?>" alt="<?php echo esc_attr__('HT Mega Addons', 'htmega-addons'); ?>"/>
    3839                    </a>
    3940                </div>
  • ht-mega-for-elementor/trunk/htmega_addons_elementor.php

    r3425025 r3426838  
    66 * Author:      HasThemes
    77 * Author URI:  https://hasthemes.com/
    8  * Version:     3.0.3
     8 * Version:     3.0.4
    99 * License:     GPL2
    1010 * License URI:  https://www.gnu.org/licenses/gpl-2.0.html
    1111 * Text Domain: htmega-addons
    1212 * Domain Path: /languages
    13  * Elementor tested up to: 3.33.6
    14  * Elementor Pro tested up to: 3.33.2
     13 * Elementor tested up to: 3.34.0
     14 * Elementor Pro tested up to: 3.34.0
    1515*/
    1616
    1717if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly
    18 define( 'HTMEGA_VERSION', '3.0.3' );
     18define( 'HTMEGA_VERSION', '3.0.4' );
    1919define( 'HTMEGA_ADDONS_PL_ROOT', __FILE__ );
    2020define( 'HTMEGA_ADDONS_PL_URL', plugins_url( '/', HTMEGA_ADDONS_PL_ROOT ) );
  • ht-mega-for-elementor/trunk/includes/class.htmega.php

    r3394916 r3426838  
    9898        add_filter('plugin_action_links_'.HTMEGA_ADDONS_PLUGIN_BASE, [ $this, 'plugins_setting_links' ] );
    9999        add_filter( 'plugin_row_meta', [ $this, 'htmega_plugin_row_meta' ], 10, 4 );
    100 
    101           /**
    102          * [$template_info] Assign template data
    103          * @var [type]
    104          */
    105         if( is_admin() && class_exists('\HTMega_Template_Library') ){
    106             self::$template_info = \HTMega_Template_Library::instance()->get_templates_info();
    107         }
    108100    }
    109101
     
    163155            // Admin Notices
    164156            add_action( 'admin_head', [ $this, 'admin_rating_notice' ] );
    165             //add_action( 'admin_head', [ $this, 'admin_halloween_notice' ] );
    166157            add_action( 'admin_head', [ $this, 'admin_promo_notice' ] );
    167158            if ( is_plugin_active('htmega-pro/htmega_pro.php' ) ) {
     
    329320            return;
    330321        }
    331    
    332         if( !isset( self::$template_info['notices'] ) || !is_array( self::$template_info['notices'] ) ){
    333             return;
    334         }
    335        
    336         if( isset( self::$template_info['notices']['banner'][0]['status'] ) ){
    337            
    338             if( self::$template_info['notices']['banner'][0]['status'] == 0 ){
    339                 return;
    340             }
    341         }else{
    342             return;
    343         }
    344 
    345         // Fetch data
    346         $bannerLink = self::$template_info['notices']['banner'][0]['bannerlink'] ? self::$template_info['notices']['banner'][0]['bannerlink'] : '#';
    347         $bannerTitle = self::$template_info['notices']['banner'][0]['title'] ? self::$template_info['notices']['banner'][0]['title'] : esc_html__('Promo Banner','htmega-addons');
    348         $bannerDescription = self::$template_info['notices']['banner'][0]['description'] ? self::$template_info['notices']['banner'][0]['description'] : '';
    349         $bannerImage = self::$template_info['notices']['banner'][0]['bannerimage'] ? '<img src="'.esc_url(self::$template_info['notices']['banner'][0]['bannerimage']).'" alt="'.esc_attr($bannerTitle).'"/>' : '';
    350 
    351         $banner['image'] = $bannerImage;
    352         $banner['url'] = $bannerLink;
    353         \HasTech_Notices::set_notice(
    354             [
    355                 'id'          => 'htmega-promotional-banner',
    356                 'type'        => 'info',
    357                 'dismissible' => true,
    358                 'message'     => $bannerDescription,
    359                 'banner'      => $banner,
    360                 'close_by'    => 'transient',
    361                 'priority'    => 2,
    362             ]
    363         );
    364            
    365     }
    366 
    367 
    368     /**
    369      * Halloween Notice
    370      *
    371      * @return void
    372      */
    373     public function admin_halloween_notice(){
    374         $plugins = get_plugins();
    375 
    376         if ( is_plugin_active('htmega-pro/htmega_pro.php' ) ) {
    377             return;
    378         }
    379         $url = 'https://wphtmega.com/pricing/?utm_source=admin&utm_medium=dashboard&utm_campaign=halloween';
    380         $image = HTMEGA_ADDONS_PL_URL . 'admin/assets/images/htmega-halloween.png';
    381 
    382    
    383         \HasTech_Notices::set_notice(
    384             [
    385                 'id'          => 'htmega-halloween-notice',
    386                 'type'        => 'notice',
    387                 'dismissible' => true,
    388                 'message_type' => 'banner',
    389                 'banner' => [
    390                     'url' => esc_url_raw($url),
    391                     'image' => '<img src="'.esc_url($image).'" alt="'. esc_html("HT Mega",'htmega-addons') . '" style="max-width:100%"/>'
    392                 ],
    393                 'close_by'    => 'transient'
    394             ]
    395         );
    396     }
     322        // showing notice through the remote api
     323        $noticeManager = HTMega_Notice_Manager::instance();
     324        $notices = $noticeManager->get_notices_info();
     325        if(!empty($notices)) {
     326            foreach ($notices as $notice) {
     327                if(empty($notice['disable'])) {
     328                    HasTech_Notices::set_notice($notice);
     329                }
     330            }
     331        }
     332    }
     333
    397334
    398335    /**
  • ht-mega-for-elementor/trunk/readme.txt

    r3425025 r3426838  
    44Requires at least: 5.0
    55Tested up to: 6.9
    6 Stable tag: 3.0.3
     6Stable tag: 3.0.4
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    238238== Changelog ==
    239239
     240= Version 3.0.4 - Date: 2025-12-24 =
     241* Fixed: Template library request issue.
     242* Tested: Compatibility with the latest version of Elementor.
     243
    240244= Version 3.0.3 - Date: 2025-12-22 =
    241245* Fixed: Library transient size issue.
Note: See TracChangeset for help on using the changeset viewer.