Happy Addons for Elementor (Mega Menu, Post Grid, Woocommerce Product Grid, Table, Event Calendar, Slider Elementor Widget) - Version 2.2.4

Version Description

  • 8 November 2019 =

  • Tweak: Improved on demand assets loading for Elementor theme builder

  • Tweak: Improved support for 3rd party header, footer builders

  • Fix: Dashboard php error for users with non admin or super admin roles

Download this release

Release Info

Developer thehappymonster
Plugin Icon 128x128 Happy Addons for Elementor (Mega Menu, Post Grid, Woocommerce Product Grid, Table, Event Calendar, Slider Elementor Widget)
Version 2.2.4
Comparing to
See all releases

Code changes from version 2.2.3 to 2.2.4

Files changed (4) hide show
  1. classes/assets-manager.php +11 -14
  2. classes/dashboard.php +10 -2
  3. plugin.php +2 -2
  4. readme.txt +11 -6
classes/assets-manager.php CHANGED
@@ -14,7 +14,7 @@ class Assets_Manager {
14
  // Frontend scripts
15
  add_action( 'wp_enqueue_scripts', [ __CLASS__, 'frontend_register' ] );
16
  add_action( 'wp_enqueue_scripts', [ __CLASS__, 'frontend_enqueue' ], 99 );
17
- add_action( 'elementor/css-file/post/enqueue', [ __CLASS__, 'frontend_elementor_enqueue' ] );
18
 
19
  // Edit and preview enqueue
20
  add_action( 'elementor/preview/enqueue_styles', [ __CLASS__, 'enqueue_preview_style' ] );
@@ -201,28 +201,25 @@ class Assets_Manager {
201
  }
202
 
203
  /**
204
- * Enqueue elementor template cached stylesheet
205
- * when used in as shortcode in a page.
206
- *
207
- * This system depends of elementor cache
208
  *
209
  * @param Post_CSS $file
210
  */
211
- public static function frontend_elementor_enqueue( Post_CSS $file ) {
212
- /**
213
- * Todo: Fix exclusive or unknown cpt cache support issue, 1 possible solution is get_queried_object_id() !== $file->get_post_id()
214
- */
215
- if ( get_post_type( $file->get_post_id() ) === 'elementor_library' ) {
216
- $should_enqueue = Cache_Manager::should_enqueue( $file->get_post_id() );
217
- if ( ! $should_enqueue && $file->get_post_id() === get_the_ID() ) {
218
- Cache_Manager::enqueue_without_cache();
219
- } elseif ( $should_enqueue ) {
220
  Cache_Manager::enqueue( $file->get_post_id() );
 
 
221
  }
222
  }
223
  }
224
 
225
  public static function frontend_enqueue() {
 
 
 
 
226
  if ( Cache_Manager::should_enqueue( get_the_ID() ) ) {
227
  Cache_Manager::enqueue( get_the_ID() );
228
  } else {
14
  // Frontend scripts
15
  add_action( 'wp_enqueue_scripts', [ __CLASS__, 'frontend_register' ] );
16
  add_action( 'wp_enqueue_scripts', [ __CLASS__, 'frontend_enqueue' ], 99 );
17
+ add_action( 'elementor/css-file/post/enqueue', [ __CLASS__, 'frontend_enqueue_exceptions' ] );
18
 
19
  // Edit and preview enqueue
20
  add_action( 'elementor/preview/enqueue_styles', [ __CLASS__, 'enqueue_preview_style' ] );
201
  }
202
 
203
  /**
204
+ * Handle exception cases where regular enqueue won't work
 
 
 
205
  *
206
  * @param Post_CSS $file
207
  */
208
+ public static function frontend_enqueue_exceptions( Post_CSS $file ) {
209
+ if ( get_queried_object_id() !== $file->get_post_id() ) {
210
+ if ( Cache_Manager::should_enqueue( $file->get_post_id() ) ) {
 
 
 
 
 
 
211
  Cache_Manager::enqueue( $file->get_post_id() );
212
+ } else {
213
+ Cache_Manager::enqueue_without_cache();
214
  }
215
  }
216
  }
217
 
218
  public static function frontend_enqueue() {
219
+ if ( ! is_singular() ) {
220
+ return;
221
+ }
222
+
223
  if ( Cache_Manager::should_enqueue( get_the_ID() ) ) {
224
  Cache_Manager::enqueue( get_the_ID() );
225
  } else {
classes/dashboard.php CHANGED
@@ -37,7 +37,11 @@ class Dashboard {
37
  }
38
 
39
  public static function add_action_links( $links ) {
40
- $links = array_merge([
 
 
 
 
41
  sprintf( '<a href="%s">%s</a>',
42
  ha_get_dashboard_link(),
43
  esc_html__( 'Settings', 'happy-elementor-addons' )
@@ -79,7 +83,7 @@ class Dashboard {
79
  }
80
 
81
  public static function enqueue_scripts( $hook ) {
82
- if ( self::$menu_slug !== $hook ) {
83
  return;
84
  }
85
 
@@ -195,6 +199,10 @@ class Dashboard {
195
  }
196
 
197
  public static function update_menu_items() {
 
 
 
 
198
  global $submenu;
199
  $menu = $submenu[ self::PAGE_SLUG ];
200
  array_shift( $menu );
37
  }
38
 
39
  public static function add_action_links( $links ) {
40
+ if ( ! current_user_can( 'manage_options' ) ) {
41
+ return $links;
42
+ }
43
+
44
+ $links = array_merge( [
45
  sprintf( '<a href="%s">%s</a>',
46
  ha_get_dashboard_link(),
47
  esc_html__( 'Settings', 'happy-elementor-addons' )
83
  }
84
 
85
  public static function enqueue_scripts( $hook ) {
86
+ if ( self::$menu_slug !== $hook || ! current_user_can( 'manage_options' ) ) {
87
  return;
88
  }
89
 
199
  }
200
 
201
  public static function update_menu_items() {
202
+ if ( ! current_user_can( 'manage_options' ) ) {
203
+ return;
204
+ }
205
+
206
  global $submenu;
207
  $menu = $submenu[ self::PAGE_SLUG ];
208
  array_shift( $menu );
plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Happy Elementor Addons
4
  * Plugin URI: https://happyaddons.com/
5
  * Description: <a href="https://happyaddons.com/">HappyAddons</a> is a collection of slick, powerful widgets that works seamlessly with Elementor page builder. It’s trendy look with detail customization features allows to create extraordinary designs instantly. <a href="https://happyaddons.com/">HappyAddons</a> is free, rapidly growing and comes with great support.
6
- * Version: 2.2.3
7
  * Author: weDevs
8
  * Author URI: https://happyaddons.com/
9
  * License: GPLv2
@@ -34,7 +34,7 @@ Copyright 2019 HappyMonster <http://happymonster.me>
34
 
35
  defined( 'ABSPATH' ) || die();
36
 
37
- define( 'HAPPY_ADDONS_VERSION', '2.2.3' );
38
  define( 'HAPPY_ADDONS__FILE__', __FILE__ );
39
  define( 'HAPPY_ADDONS_DIR_PATH', plugin_dir_path( HAPPY_ADDONS__FILE__ ) );
40
  define( 'HAPPY_ADDONS_DIR_URL', plugin_dir_url( HAPPY_ADDONS__FILE__ ) );
3
  * Plugin Name: Happy Elementor Addons
4
  * Plugin URI: https://happyaddons.com/
5
  * Description: <a href="https://happyaddons.com/">HappyAddons</a> is a collection of slick, powerful widgets that works seamlessly with Elementor page builder. It’s trendy look with detail customization features allows to create extraordinary designs instantly. <a href="https://happyaddons.com/">HappyAddons</a> is free, rapidly growing and comes with great support.
6
+ * Version: 2.2.4
7
  * Author: weDevs
8
  * Author URI: https://happyaddons.com/
9
  * License: GPLv2
34
 
35
  defined( 'ABSPATH' ) || die();
36
 
37
+ define( 'HAPPY_ADDONS_VERSION', '2.2.4' );
38
  define( 'HAPPY_ADDONS__FILE__', __FILE__ );
39
  define( 'HAPPY_ADDONS_DIR_PATH', plugin_dir_path( HAPPY_ADDONS__FILE__ ) );
40
  define( 'HAPPY_ADDONS_DIR_URL', plugin_dir_url( HAPPY_ADDONS__FILE__ ) );
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
  === Happy Elementor Addons ===
2
  Plugin Name: Happy Elementor Addons
3
- Version: 2.2.3
4
  Author: weDevs
5
  Author URI: https://happyaddons.com/
6
  Contributors: thehappymonster, happyaddons, hasinhayder, mosaddek73, tareq1988, sourav926, wedevs, iqbalrony, obiplabon
7
  Tags: elementor, elementor addon, elementor widget, essential widget, elements
8
  Requires at least: 4.7
9
- Tested up to: 5.2.3
10
  Stable tag: trunk
11
  Requires PHP: 5.4
12
  License: GPLv2
@@ -21,8 +21,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
21
  https://www.youtube.com/watch?v=XpWm7zdvUoM
22
 
23
  > HappyAddons is a unique Elementor Addon
24
- — Adam Preiser founder of WP Crafter
25
-
26
 
27
  ### Included 25 Free Widgets
28
 
@@ -146,10 +145,16 @@ It's really easy and super simple to install **Happy Elementor Addons** plugin b
146
 
147
  == Changelog ==
148
 
 
 
 
 
 
 
149
  = 2.2.3 - 6 November 2019 =
150
 
151
- - Update: Improved support for image optimization plugins. ex: Shortpixel Image Optimiser
152
- - Update: Widgets default styles
153
  - Fix: WPForms Pro compatibility issue
154
  - Fix: Image border radius style issue
155
 
1
  === Happy Elementor Addons ===
2
  Plugin Name: Happy Elementor Addons
3
+ Version: 2.2.4
4
  Author: weDevs
5
  Author URI: https://happyaddons.com/
6
  Contributors: thehappymonster, happyaddons, hasinhayder, mosaddek73, tareq1988, sourav926, wedevs, iqbalrony, obiplabon
7
  Tags: elementor, elementor addon, elementor widget, essential widget, elements
8
  Requires at least: 4.7
9
+ Tested up to: 5.2.4
10
  Stable tag: trunk
11
  Requires PHP: 5.4
12
  License: GPLv2
21
  https://www.youtube.com/watch?v=XpWm7zdvUoM
22
 
23
  > HappyAddons is a unique Elementor Addon
24
+ — Adam Preiser, Founder of WP Crafter
 
25
 
26
  ### Included 25 Free Widgets
27
 
145
 
146
  == Changelog ==
147
 
148
+ = 2.2.4 - 8 November 2019 =
149
+
150
+ - Tweak: Improved on demand assets loading for Elementor theme builder
151
+ - Tweak: Improved support for 3rd party header, footer builders
152
+ - Fix: Dashboard php error for users with non admin or super admin roles
153
+
154
  = 2.2.3 - 6 November 2019 =
155
 
156
+ - Tweak: Improved support for image optimization plugins. ex: Shortpixel Image Optimiser
157
+ - Tweak: Widgets default styles
158
  - Fix: WPForms Pro compatibility issue
159
  - Fix: Image border radius style issue
160