Changeset 3426838
- Timestamp:
- 12/24/2025 12:38:11 PM (3 months ago)
- Location:
- ht-mega-for-elementor
- Files:
-
- 2 added
- 10 edited
- 1 copied
-
tags/3.0.4 (copied) (copied from ht-mega-for-elementor/trunk)
-
tags/3.0.4/admin/admin-init.php (modified) (1 diff)
-
tags/3.0.4/admin/include/class-notice-manager.php (added)
-
tags/3.0.4/admin/include/settings-panel/includes/templates/sidebar-banner.php (modified) (2 diffs)
-
tags/3.0.4/htmega_addons_elementor.php (modified) (1 diff)
-
tags/3.0.4/includes/class.htmega.php (modified) (3 diffs)
-
tags/3.0.4/readme.txt (modified) (2 diffs)
-
trunk/admin/admin-init.php (modified) (1 diff)
-
trunk/admin/include/class-notice-manager.php (added)
-
trunk/admin/include/settings-panel/includes/templates/sidebar-banner.php (modified) (2 diffs)
-
trunk/htmega_addons_elementor.php (modified) (1 diff)
-
trunk/includes/class.htmega.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ht-mega-for-elementor/tags/3.0.4/admin/admin-init.php
r3383050 r3426838 39 39 require_once ('include/class.library-source.php' ); 40 40 require_once( 'include/class.dynamic-notice.php' ); // dynamic notice file 41 require_once( 'include/class-notice-manager.php' ); // notice manager file 41 42 require_once( HTMEGA_ADDONS_PL_PATH.'includes/class.api.php' ); 42 43 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 14 14 } 15 15 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(); 19 20 if (is_plugin_active('htmega-pro/htmega_pro.php')) { 20 21 $htmega_license_title = apply_filters('htmega_license_title', 'lifetime'); 21 22 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']) ) { 23 24 ?> 24 25 <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'); ?>"/> 27 28 </a> 28 29 </div> … … 31 32 } 32 33 } 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']) ) { 34 35 ?> 35 36 <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'); ?>"/> 38 39 </a> 39 40 </div> -
ht-mega-for-elementor/tags/3.0.4/htmega_addons_elementor.php
r3425025 r3426838 6 6 * Author: HasThemes 7 7 * Author URI: https://hasthemes.com/ 8 * Version: 3.0. 38 * Version: 3.0.4 9 9 * License: GPL2 10 10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 11 11 * Text Domain: htmega-addons 12 12 * Domain Path: /languages 13 * Elementor tested up to: 3.3 3.614 * Elementor Pro tested up to: 3.3 3.213 * Elementor tested up to: 3.34.0 14 * Elementor Pro tested up to: 3.34.0 15 15 */ 16 16 17 17 if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly 18 define( 'HTMEGA_VERSION', '3.0. 3' );18 define( 'HTMEGA_VERSION', '3.0.4' ); 19 19 define( 'HTMEGA_ADDONS_PL_ROOT', __FILE__ ); 20 20 define( 'HTMEGA_ADDONS_PL_URL', plugins_url( '/', HTMEGA_ADDONS_PL_ROOT ) ); -
ht-mega-for-elementor/tags/3.0.4/includes/class.htmega.php
r3394916 r3426838 98 98 add_filter('plugin_action_links_'.HTMEGA_ADDONS_PLUGIN_BASE, [ $this, 'plugins_setting_links' ] ); 99 99 add_filter( 'plugin_row_meta', [ $this, 'htmega_plugin_row_meta' ], 10, 4 ); 100 101 /**102 * [$template_info] Assign template data103 * @var [type]104 */105 if( is_admin() && class_exists('\HTMega_Template_Library') ){106 self::$template_info = \HTMega_Template_Library::instance()->get_templates_info();107 }108 100 } 109 101 … … 163 155 // Admin Notices 164 156 add_action( 'admin_head', [ $this, 'admin_rating_notice' ] ); 165 //add_action( 'admin_head', [ $this, 'admin_halloween_notice' ] );166 157 add_action( 'admin_head', [ $this, 'admin_promo_notice' ] ); 167 158 if ( is_plugin_active('htmega-pro/htmega_pro.php' ) ) { … … 329 320 return; 330 321 } 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 397 334 398 335 /** -
ht-mega-for-elementor/tags/3.0.4/readme.txt
r3425025 r3426838 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 3.0. 36 Stable tag: 3.0.4 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 238 238 == Changelog == 239 239 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 240 244 = Version 3.0.3 - Date: 2025-12-22 = 241 245 * Fixed: Library transient size issue. -
ht-mega-for-elementor/trunk/admin/admin-init.php
r3383050 r3426838 39 39 require_once ('include/class.library-source.php' ); 40 40 require_once( 'include/class.dynamic-notice.php' ); // dynamic notice file 41 require_once( 'include/class-notice-manager.php' ); // notice manager file 41 42 require_once( HTMEGA_ADDONS_PL_PATH.'includes/class.api.php' ); 42 43 if( ! class_exists( 'HTMega_Settings_API' ) ) { -
ht-mega-for-elementor/trunk/admin/include/settings-panel/includes/templates/sidebar-banner.php
r3328677 r3426838 14 14 } 15 15 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(); 19 20 if (is_plugin_active('htmega-pro/htmega_pro.php')) { 20 21 $htmega_license_title = apply_filters('htmega_license_title', 'lifetime'); 21 22 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']) ) { 23 24 ?> 24 25 <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'); ?>"/> 27 28 </a> 28 29 </div> … … 31 32 } 32 33 } 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']) ) { 34 35 ?> 35 36 <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'); ?>"/> 38 39 </a> 39 40 </div> -
ht-mega-for-elementor/trunk/htmega_addons_elementor.php
r3425025 r3426838 6 6 * Author: HasThemes 7 7 * Author URI: https://hasthemes.com/ 8 * Version: 3.0. 38 * Version: 3.0.4 9 9 * License: GPL2 10 10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 11 11 * Text Domain: htmega-addons 12 12 * Domain Path: /languages 13 * Elementor tested up to: 3.3 3.614 * Elementor Pro tested up to: 3.3 3.213 * Elementor tested up to: 3.34.0 14 * Elementor Pro tested up to: 3.34.0 15 15 */ 16 16 17 17 if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly 18 define( 'HTMEGA_VERSION', '3.0. 3' );18 define( 'HTMEGA_VERSION', '3.0.4' ); 19 19 define( 'HTMEGA_ADDONS_PL_ROOT', __FILE__ ); 20 20 define( 'HTMEGA_ADDONS_PL_URL', plugins_url( '/', HTMEGA_ADDONS_PL_ROOT ) ); -
ht-mega-for-elementor/trunk/includes/class.htmega.php
r3394916 r3426838 98 98 add_filter('plugin_action_links_'.HTMEGA_ADDONS_PLUGIN_BASE, [ $this, 'plugins_setting_links' ] ); 99 99 add_filter( 'plugin_row_meta', [ $this, 'htmega_plugin_row_meta' ], 10, 4 ); 100 101 /**102 * [$template_info] Assign template data103 * @var [type]104 */105 if( is_admin() && class_exists('\HTMega_Template_Library') ){106 self::$template_info = \HTMega_Template_Library::instance()->get_templates_info();107 }108 100 } 109 101 … … 163 155 // Admin Notices 164 156 add_action( 'admin_head', [ $this, 'admin_rating_notice' ] ); 165 //add_action( 'admin_head', [ $this, 'admin_halloween_notice' ] );166 157 add_action( 'admin_head', [ $this, 'admin_promo_notice' ] ); 167 158 if ( is_plugin_active('htmega-pro/htmega_pro.php' ) ) { … … 329 320 return; 330 321 } 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 397 334 398 335 /** -
ht-mega-for-elementor/trunk/readme.txt
r3425025 r3426838 4 4 Requires at least: 5.0 5 5 Tested up to: 6.9 6 Stable tag: 3.0. 36 Stable tag: 3.0.4 7 7 License: GPLv2 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 238 238 == Changelog == 239 239 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 240 244 = Version 3.0.3 - Date: 2025-12-22 = 241 245 * Fixed: Library transient size issue.
Note: See TracChangeset
for help on using the changeset viewer.