NavMenu Addon For Elementor - Version 1.1.3

Version Description

  • 2018-11-27
Download this release

Release Info

Developer themeisle
Plugin Icon wp plugin NavMenu Addon For Elementor
Version 1.1.3
Comparing to
See all releases

Code changes from version 1.1.2 to 1.1.3

CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
 
 
 
 
 
2
  ### v1.1.2 - 2017-11-27
3
  **Changes:**
4
  * Fix TGM strings for recommended plugins.
1
 
2
+ ### v1.1.3 - 2018-11-27
3
+ **Changes:**
4
+ * Add notice for recommended theme
5
+
6
  ### v1.1.2 - 2017-11-27
7
  **Changes:**
8
  * Fix TGM strings for recommended plugins.
elementor-navmenu.php CHANGED
@@ -3,8 +3,7 @@
3
  * Plugin Name: NavMenu Addon For Elementor
4
  * Description: Adds new NavMenus to the Elementor Page Builder plugin. Now with Site Branding options, search box, basic MegaMenu and Fullscreen Menu Overlay
5
  * Plugin URI: https://themeisle.com/
6
- * Author: ThemeIsle
7
- * Version: 1.1.2
8
  * Author URI: https://themeisle.com/
9
  *
10
  * Text Domain: navmenu-addon-for-elementor
@@ -16,7 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) {
16
  exit;
17
  } // Exit if accessed directly
18
 
19
- define( 'ELEMENTOR_MENUS_VERSION', '1.1.2' );
20
 
21
  define( 'ELEMENTOR_MENUS__FILE__', __FILE__ );
22
  define( 'ELEMENTOR_MENUS_PLUGIN_BASE', plugin_basename( ELEMENTOR_MENUS__FILE__ ) );
@@ -228,5 +227,61 @@ if ( is_readable( $vendor_file ) ) {
228
  add_filter( 'themeisle_sdk_products', 'navmenu_elementor_register_sdk', 10, 1 );
229
  function navmenu_elementor_register_sdk( $products ) {
230
  $products[] = ELEMENTOR_MENUS__FILE__;
 
231
  return $products;
232
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  * Plugin Name: NavMenu Addon For Elementor
4
  * Description: Adds new NavMenus to the Elementor Page Builder plugin. Now with Site Branding options, search box, basic MegaMenu and Fullscreen Menu Overlay
5
  * Plugin URI: https://themeisle.com/
6
+ * Author: ThemeIsle Version: 1.1.3
 
7
  * Author URI: https://themeisle.com/
8
  *
9
  * Text Domain: navmenu-addon-for-elementor
15
  exit;
16
  } // Exit if accessed directly
17
 
18
+ define( 'ELEMENTOR_MENUS_VERSION', '1.1.3' );
19
 
20
  define( 'ELEMENTOR_MENUS__FILE__', __FILE__ );
21
  define( 'ELEMENTOR_MENUS_PLUGIN_BASE', plugin_basename( ELEMENTOR_MENUS__FILE__ ) );
227
  add_filter( 'themeisle_sdk_products', 'navmenu_elementor_register_sdk', 10, 1 );
228
  function navmenu_elementor_register_sdk( $products ) {
229
  $products[] = ELEMENTOR_MENUS__FILE__;
230
+
231
  return $products;
232
  }
233
+
234
+
235
+ /**
236
+ * Add a dismissible notice in the dashboard about Neve
237
+ */
238
+ function navmenu_elementor_neve_notice() {
239
+ global $current_user;
240
+ $user_id = $current_user->ID;
241
+ $ignored_notice = get_user_meta( $user_id, 'navmenu_elementor_ignore_neve_notice' );
242
+ if ( ! empty( $ignored_notice ) ) {
243
+ return;
244
+ }
245
+ $dismiss_button =
246
+ sprintf(
247
+ '<a href="%s" class="notice-dismiss" style="text-decoration:none;"></a>',
248
+ '?navmenu_elementor_nag_ignore_neve=0'
249
+ );
250
+ $message =
251
+ sprintf(
252
+ /* translators: Install Neve link */
253
+ esc_html__( 'NavMenu Addon For Elementor recommends %1$s. Fully AMP optimized and responsive, Neve will load in mere seconds and adapt perfectly on any viewing device. Neve works perfectly with Gutenberg and the most popular page builders. You will love it!', 'navmenu-addon-for-elementor' ),
254
+ sprintf(
255
+ /* translators: Install Neve link */
256
+ '<a target="_blank" href="%1$s"><strong>%2$s</strong></a>',
257
+ esc_url( admin_url( 'theme-install.php?theme=neve' ) ),
258
+ esc_html__( 'Neve', 'navmenu-addon-for-elementor' )
259
+ )
260
+ );
261
+ printf(
262
+ '<div class="notice updated" style="position:relative;">%1$s<p>%2$s</p></div>',
263
+ $dismiss_button,
264
+ $message
265
+ );
266
+ }
267
+
268
+ /**
269
+ * Update the navmenu_elementor_nag_ignore_neve option to true, to dismiss the notice from the dashboard
270
+ */
271
+ function navmenu_elementor_nag_ignore_neve() {
272
+ global $current_user;
273
+ $user_id = $current_user->ID;
274
+ /* If user clicks to ignore the notice, add that to their user meta */
275
+ if ( isset( $_GET['navmenu_elementor_nag_ignore_neve'] ) && '0' == $_GET['navmenu_elementor_nag_ignore_neve'] ) {
276
+ add_user_meta( $user_id, 'navmenu_elementor_ignore_neve_notice', 'true', true );
277
+ }
278
+ }
279
+
280
+ $current_theme = wp_get_theme();
281
+ $theme_name = $current_theme->get( 'TextDomain' );
282
+ $template = $current_theme->get( 'Template' );
283
+ if ( $theme_name !== 'neve' && $template !== 'neve' ) {
284
+ add_action( 'admin_notices', 'navmenu_elementor_neve_notice' );
285
+ add_action( 'admin_init', 'navmenu_elementor_nag_ignore_neve' );
286
+ }
287
+
modules/branding/widgets/elementor-branding.php CHANGED
@@ -288,7 +288,7 @@ class Elementor_Branding extends Widget_Base {
288
  }
289
 
290
  protected function render_title() {
291
- ?>
292
  <span class="site-title">
293
  <?php
294
  $title = get_bloginfo( 'name' );
@@ -301,9 +301,9 @@ class Elementor_Branding extends Widget_Base {
301
  <?php
302
  $description = get_bloginfo( 'description', 'display' );
303
  if ( $description || is_customize_preview() ) :
304
- ?>
305
  <p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
306
- <?php
307
  endif;
308
  }
309
 
288
  }
289
 
290
  protected function render_title() {
291
+ ?>
292
  <span class="site-title">
293
  <?php
294
  $title = get_bloginfo( 'name' );
301
  <?php
302
  $description = get_bloginfo( 'description', 'display' );
303
  if ( $description || is_customize_preview() ) :
304
+ ?>
305
  <p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
306
+ <?php
307
  endif;
308
  }
309
 
modules/menus/widgets/default-navmenu.php CHANGED
@@ -652,7 +652,7 @@ class Default_Navmenu extends Widget_Base {
652
  </nav>
653
  </div>
654
  </div>
655
- <?php
656
  }
657
 
658
  protected function _content_template() {}
652
  </nav>
653
  </div>
654
  </div>
655
+ <?php
656
  }
657
 
658
  protected function _content_template() {}
modules/menus/widgets/elementor-branding.php CHANGED
@@ -286,7 +286,7 @@ class Elementor_Branding extends Widget_Base {
286
  }
287
 
288
  protected function render_title() {
289
- ?>
290
  <span class="site-title">
291
  <?php
292
  $title = get_bloginfo( 'name' );
@@ -299,9 +299,9 @@ class Elementor_Branding extends Widget_Base {
299
  <?php
300
  $description = get_bloginfo( 'description', 'display' );
301
  if ( $description || is_customize_preview() ) :
302
- ?>
303
  <p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
304
- <?php
305
  endif;
306
  }
307
 
286
  }
287
 
288
  protected function render_title() {
289
+ ?>
290
  <span class="site-title">
291
  <?php
292
  $title = get_bloginfo( 'name' );
299
  <?php
300
  $description = get_bloginfo( 'description', 'display' );
301
  if ( $description || is_customize_preview() ) :
302
+ ?>
303
  <p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
304
+ <?php
305
  endif;
306
  }
307
 
modules/menus/widgets/mega-menu.php CHANGED
@@ -264,7 +264,7 @@ class Mega_Menu extends Widget_Base {
264
  ?>
265
  </div>
266
  </nav>
267
- <?php
268
  }
269
 
270
  protected function _content_template() {}
264
  ?>
265
  </div>
266
  </nav>
267
+ <?php
268
  }
269
 
270
  protected function _content_template() {}
modules/menus/widgets/navmenu-overlay.php CHANGED
@@ -242,7 +242,7 @@ class Navmenu_Overlay extends Widget_Base {
242
  'depth' => 1,
243
  'walker' => '',
244
  );
245
- ?>
246
  <!--<div class="navmenu-overlay">-->
247
  <span id="touch-menu" class="mobile-menu"><span></span></span>
248
  <nav itemtype="http://schema.org/SiteNavigationElement" itemscope="itemscope" class="overlay-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Elementor Menu', 'navmenu-addon-for-elementor' ); ?>">
@@ -258,7 +258,7 @@ class Navmenu_Overlay extends Widget_Base {
258
  ?>
259
  </nav>
260
  <!--</div>-->
261
- <?php
262
  }
263
 
264
  protected function _content_template() {}
242
  'depth' => 1,
243
  'walker' => '',
244
  );
245
+ ?>
246
  <!--<div class="navmenu-overlay">-->
247
  <span id="touch-menu" class="mobile-menu"><span></span></span>
248
  <nav itemtype="http://schema.org/SiteNavigationElement" itemscope="itemscope" class="overlay-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Elementor Menu', 'navmenu-addon-for-elementor' ); ?>">
258
  ?>
259
  </nav>
260
  <!--</div>-->
261
+ <?php
262
  }
263
 
264
  protected function _content_template() {}
plugin.php CHANGED
@@ -223,7 +223,9 @@ class Plugin {
223
 
224
  public function enqueue_default_scripts() {
225
  wp_localize_script(
226
- 'elementor-menus-frontend', 'elementorScreenReaderText', array(
 
 
227
  'expand' => __( 'expand child menu', 'navmenu-addon-for-elementor' ),
228
  'collapse' => __( 'collapse child menu', 'navmenu-addon-for-elementor' ),
229
  )
@@ -232,7 +234,9 @@ class Plugin {
232
 
233
  public function enqueue_default_secondary_scripts() {
234
  wp_localize_script(
235
- 'elementor-menus-frontend', 'elementorSecondaryScreenReaderText', array(
 
 
236
  'expand' => __( 'expand child menu', 'navmenu-addon-for-elementor' ),
237
  'collapse' => __( 'collapse child menu', 'navmenu-addon-for-elementor' ),
238
  )
@@ -241,7 +245,9 @@ class Plugin {
241
 
242
  public function enqueue_panel_default_scripts() {
243
  wp_localize_script(
244
- 'elementor-menus', 'elementorScreenReaderText', array(
 
 
245
  'expand' => __( 'expand child menu', 'navmenu-addon-for-elementor' ),
246
  'collapse' => __( 'collapse child menu', 'navmenu-addon-for-elementor' ),
247
  )
223
 
224
  public function enqueue_default_scripts() {
225
  wp_localize_script(
226
+ 'elementor-menus-frontend',
227
+ 'elementorScreenReaderText',
228
+ array(
229
  'expand' => __( 'expand child menu', 'navmenu-addon-for-elementor' ),
230
  'collapse' => __( 'collapse child menu', 'navmenu-addon-for-elementor' ),
231
  )
234
 
235
  public function enqueue_default_secondary_scripts() {
236
  wp_localize_script(
237
+ 'elementor-menus-frontend',
238
+ 'elementorSecondaryScreenReaderText',
239
+ array(
240
  'expand' => __( 'expand child menu', 'navmenu-addon-for-elementor' ),
241
  'collapse' => __( 'collapse child menu', 'navmenu-addon-for-elementor' ),
242
  )
245
 
246
  public function enqueue_panel_default_scripts() {
247
  wp_localize_script(
248
+ 'elementor-menus',
249
+ 'elementorScreenReaderText',
250
+ array(
251
  'expand' => __( 'expand child menu', 'navmenu-addon-for-elementor' ),
252
  'collapse' => __( 'collapse child menu', 'navmenu-addon-for-elementor' ),
253
  )
readme.md CHANGED
@@ -53,6 +53,11 @@ Done! :)
53
  * For the time being, any changes made to both of the above can be viewed on the frontend of the site. A fix is being sought and will be implemented as soon as a viable solution is found!
54
 
55
  ## Changelog ##
 
 
 
 
 
56
  ### 1.1.2 - 2017-11-27 ###
57
 
58
  * Fix TGM strings for recommended plugins.
53
  * For the time being, any changes made to both of the above can be viewed on the frontend of the site. A fix is being sought and will be implemented as soon as a viable solution is found!
54
 
55
  ## Changelog ##
56
+ ### 1.1.3 - 2018-11-27 ###
57
+
58
+ * Add notice for recommended theme
59
+
60
+
61
  ### 1.1.2 - 2017-11-27 ###
62
 
63
  * Fix TGM strings for recommended plugins.
readme.txt CHANGED
@@ -53,6 +53,11 @@ Done! :)
53
  * For the time being, any changes made to both of the above can be viewed on the frontend of the site. A fix is being sought and will be implemented as soon as a viable solution is found!
54
 
55
  == Changelog ==
 
 
 
 
 
56
  = 1.1.2 - 2017-11-27 =
57
 
58
  * Fix TGM strings for recommended plugins.
53
  * For the time being, any changes made to both of the above can be viewed on the frontend of the site. A fix is being sought and will be implemented as soon as a viable solution is found!
54
 
55
  == Changelog ==
56
+ = 1.1.3 - 2018-11-27 =
57
+
58
+ * Add notice for recommended theme
59
+
60
+
61
  = 1.1.2 - 2017-11-27 =
62
 
63
  * Fix TGM strings for recommended plugins.
themeisle-hash.json ADDED
@@ -0,0 +1 @@
 
1
+ {"elementor-navmenu.php":"8f214af135f738689617830b4f7725dd","index.php":"67442c5615eba73d105c0715c6620850","plugin.php":"fad0ce07b714022a11aaacfae1700c55"}