Responsive Menu - Version 4.2.0

Version Description

(8th Sep 2022) = * Feature: Added classic menu support for block themes * Bug: Fixed conflict issues with Beaver Themer Plugin * Enhancement: Added alert popup if WordPress Menus are empty

Download this release

Release Info

Developer expresstech
Plugin Icon 128x128 Responsive Menu
Version 4.2.0
Comparing to
See all releases

Code changes from version 4.1.12 to 4.2.0

readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: expresstech, responsivemenu, imvarunkmr, surajkumarsingh, infosate
3
  Tags: responsive, mega menu, navigation, mobile, hamburger
4
  Requires at least: 3.6
5
  Tested up to: 6.0
6
- Stable tag: 4.1.12
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -88,8 +88,6 @@ If you like this plugin, consider exploring our other themes and plugins:
88
 
89
  ⚡ [InstaWP](https://instawp.io/) - Launch a quick WordPress site with this sandbox service. Create New WordPress instance within a second.
90
 
91
- 🔒 [Hide My WP](https://hidemywp.net/) - Hide your WordPress from bots, attackers & spammers. Hides all the known URLs, paths, plugins, themes which can reveal that you are using WP, also comes with an in-built firewall & trust network.
92
-
93
  == Installation ==
94
 
95
  1. Upload `responsive-menu` to the `/wp-content/plugins/` directory
@@ -120,8 +118,13 @@ To view our FAQ, please go to [https://responsive.menu/faq/](https://responsive.
120
 
121
  == Changelog ==
122
 
 
 
 
 
 
123
  = 4.1.12 (1st Aug 2022) =
124
- * Bug: Fixed conflict issues with conflict with Multiple Page Generator Plugin
125
  * Enhancement: Added timestamps as a version to generated CSS/JSS urls
126
 
127
  = 4.1.11 (25th May 2022) =
3
  Tags: responsive, mega menu, navigation, mobile, hamburger
4
  Requires at least: 3.6
5
  Tested up to: 6.0
6
+ Stable tag: 4.2.0
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
88
 
89
  ⚡ [InstaWP](https://instawp.io/) - Launch a quick WordPress site with this sandbox service. Create New WordPress instance within a second.
90
 
 
 
91
  == Installation ==
92
 
93
  1. Upload `responsive-menu` to the `/wp-content/plugins/` directory
118
 
119
  == Changelog ==
120
 
121
+ = 4.2.0 (8th Sep 2022) =
122
+ * Feature: Added classic menu support for block themes
123
+ * Bug: Fixed conflict issues with Beaver Themer Plugin
124
+ * Enhancement: Added alert popup if WordPress Menus are empty
125
+
126
  = 4.1.12 (1st Aug 2022) =
127
+ * Bug: Fixed conflict issues with Multiple Page Generator Plugin
128
  * Enhancement: Added timestamps as a version to generated CSS/JSS urls
129
 
130
  = 4.1.11 (25th May 2022) =
responsive-menu.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Responsive Menu
5
  Plugin URI: https://expresstech.io
6
  Description: Highly Customisable Responsive Menu Plugin for WordPress
7
- Version: 4.1.12
8
  Author: ExpressTech
9
  Text Domain: responsive-menu
10
  Author URI: https://responsive.menu
@@ -16,7 +16,7 @@ Tags: responsive, menu, responsive menu, mega menu, max mega menu, max menu
16
  * Constant as plugin version.
17
  */
18
  if ( ! defined( 'RMP_PLUGIN_VERSION' ) ) {
19
- define( 'RMP_PLUGIN_VERSION', '4.1.12' );
20
  }
21
 
22
  define( 'RESPONSIVE_MENU_URL', plugin_dir_url( __FILE__ ) );
4
  Plugin Name: Responsive Menu
5
  Plugin URI: https://expresstech.io
6
  Description: Highly Customisable Responsive Menu Plugin for WordPress
7
+ Version: 4.2.0
8
  Author: ExpressTech
9
  Text Domain: responsive-menu
10
  Author URI: https://responsive.menu
16
  * Constant as plugin version.
17
  */
18
  if ( ! defined( 'RMP_PLUGIN_VERSION' ) ) {
19
+ define( 'RMP_PLUGIN_VERSION', '4.2.0' );
20
  }
21
 
22
  define( 'RESPONSIVE_MENU_URL', plugin_dir_url( __FILE__ ) );
v4.0.0/assets/admin/scss/admin.css CHANGED
@@ -2048,6 +2048,68 @@ button.menu-save {
2048
  cursor: pointer;
2049
  }
2050
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2051
  #rmp-menu-save-theme-wizard .rmp-dialog-contents {
2052
  display: flex;
2053
  justify-content: center;
@@ -2060,7 +2122,6 @@ button.menu-save {
2060
  margin: 5%;
2061
  }
2062
 
2063
-
2064
  .rmp-save-menu-input {
2065
  display: inline-flex;
2066
  margin-top: 20px;
2048
  cursor: pointer;
2049
  }
2050
 
2051
+ #rmp-new-menu-wizard .rmp-dialog-wrap.wp-clearfix.rmp-menu-empty {
2052
+ max-width: 470px;
2053
+ margin-left: auto;
2054
+ margin-right: auto;
2055
+ top: 200px;
2056
+ }
2057
+
2058
+ .rmp-menu-empty h2{
2059
+ font-weight: 500;
2060
+ font-size: 19px;
2061
+ line-height: 22px;
2062
+ letter-spacing: 0.05em;
2063
+ color: #000000;
2064
+ margin-bottom: 10px;
2065
+ }
2066
+
2067
+ .rmp-dark-mode .rmp-menu-empty h2{
2068
+ color: #fff;
2069
+ }
2070
+
2071
+ .rmp-menu-empty .rmp-btn-group {
2072
+ margin-top: 40px;
2073
+ display: flex;
2074
+ flex-wrap: wrap;
2075
+ }
2076
+
2077
+ .rmp-menu-empty p{
2078
+ font-weight: 500;
2079
+ font-size: 14px;
2080
+ line-height: 22px;
2081
+ color: #7B8795;
2082
+ }
2083
+
2084
+ .rmp-dark-mode .rmp-menu-empty p{
2085
+ color: #c8c8c8;
2086
+ }
2087
+
2088
+ #rmp-new-menu-wizard .rmp-dialog-wrap.rmp-menu-empty .rmp-dialog-contents {
2089
+ min-height: auto;
2090
+ padding: 0 30px;
2091
+ }
2092
+
2093
+ .rmp-menu-empty .rmp-btn-primary ,
2094
+ .rmp-menu-empty .rmp-btn-secondary {
2095
+ background: #62BCF2;
2096
+ border-radius: 5px;
2097
+ border: none;
2098
+ font-weight: 600;
2099
+ font-size: 13px;
2100
+ line-height: 16px;
2101
+ padding: 10px 20px;
2102
+ color: #fff;
2103
+ margin-bottom: 15px;
2104
+ margin-right: 15px;
2105
+ }
2106
+
2107
+ .rmp-menu-empty .rmp-btn-secondary {
2108
+ background: #DBE3EB;
2109
+ color: #121C24;
2110
+ padding: 10px 35px;
2111
+ }
2112
+
2113
  #rmp-menu-save-theme-wizard .rmp-dialog-contents {
2114
  display: flex;
2115
  justify-content: center;
2122
  margin: 5%;
2123
  }
2124
 
 
2125
  .rmp-save-menu-input {
2126
  display: inline-flex;
2127
  margin-top: 20px;
v4.0.0/assets/images/rmp-warning.png ADDED
Binary file
v4.0.0/inc/classes/class-style-manager.php CHANGED
@@ -65,6 +65,7 @@ class Style_Manager {
65
  add_action( 'rmp_theme_apply', array( $this, 'save_style_css_on_file' ), 10, 0 );
66
  add_action( 'rmp_migrate_menu_style', array( $this, 'save_style_css_on_file' ), 10, 0 );
67
  add_action( 'rmp_import_menu', array( $this, 'save_style_css_on_file' ), 10, 0 );
 
68
 
69
  // Hide adminbar.
70
  if ( 'hide' == $this->option_manager->get_global_option( 'menu_adjust_for_wp_admin_bar' ) ) {
@@ -1530,4 +1531,13 @@ class Style_Manager {
1530
  return new \WP_Error( 'Warning: Common style scss compile failed <br/> <br />' . $e->getMessage() );
1531
  }
1532
  }
 
 
 
 
 
 
 
 
 
1533
  }
65
  add_action( 'rmp_theme_apply', array( $this, 'save_style_css_on_file' ), 10, 0 );
66
  add_action( 'rmp_migrate_menu_style', array( $this, 'save_style_css_on_file' ), 10, 0 );
67
  add_action( 'rmp_import_menu', array( $this, 'save_style_css_on_file' ), 10, 0 );
68
+ add_action('after_setup_theme', array( $this, 'rm_add_classic_menu_support' ) );
69
 
70
  // Hide adminbar.
71
  if ( 'hide' == $this->option_manager->get_global_option( 'menu_adjust_for_wp_admin_bar' ) ) {
1531
  return new \WP_Error( 'Warning: Common style scss compile failed <br/> <br />' . $e->getMessage() );
1532
  }
1533
  }
1534
+
1535
+ /**
1536
+ * Adding theme support for menus
1537
+ *
1538
+ * @since 4.2.0
1539
+ */
1540
+ public function rm_add_classic_menu_support() {
1541
+ add_theme_support( 'menus' );
1542
+ }
1543
  }
v4.0.0/inc/helpers/custom-functions.php CHANGED
@@ -62,7 +62,7 @@ function rmp_get_list_of_pages() {
62
  foreach ( $posts as $post ) {
63
  $all_pages[ $post->ID ] = $post->post_title;
64
  }
65
-
66
  return $all_pages;
67
  }
68
 
@@ -107,7 +107,7 @@ function get_all_rmp_menu_ids() {
107
  $menu_ids[] = $menu->ID;
108
  }
109
  }
110
-
111
  return $menu_ids;
112
  }
113
 
@@ -133,7 +133,7 @@ function rmp_get_all_menus() {
133
  $menus[ $menu->ID ] = $menu->post_title;
134
  }
135
  }
136
-
137
  return $menus;
138
  }
139
 
62
  foreach ( $posts as $post ) {
63
  $all_pages[ $post->ID ] = $post->post_title;
64
  }
65
+ wp_reset_postdata();
66
  return $all_pages;
67
  }
68
 
107
  $menu_ids[] = $menu->ID;
108
  }
109
  }
110
+ wp_reset_postdata();
111
  return $menu_ids;
112
  }
113
 
133
  $menus[ $menu->ID ] = $menu->post_title;
134
  }
135
  }
136
+ wp_reset_postdata();
137
  return $menus;
138
  }
139
 
v4.0.0/templates/new-menu-wizard.php CHANGED
@@ -23,18 +23,25 @@ if ( ! empty( $global_settings['rmp_dark_mode'] ) ) {
23
  $classes = 'rmp-dark-mode';
24
  }
25
 
 
26
  ?>
27
  <div class="<?php echo esc_attr( $classes ); ?>">
28
  <section id="rmp-new-menu-wizard" class="rmp-dialog-overlay rmp-new-menu-wizard" style="display:none">
29
  <div class="rmp-dialog-backdrop"></div>
30
- <div class="rmp-dialog-wrap wp-clearfix">
31
 
32
  <!-- This is new new wizard header -->
33
  <div class="rmp-dialog-header">
34
  <div class="title">
35
- <img alt="logo" width="34" height="34" src="<?php echo esc_url( RMP_PLUGIN_URL_V4 . '/assets/images/rmp-logo.png' ); ?>" />
36
- <span> <?php esc_html_e( 'Create New Menu', 'responsive-menu' ); ?> </span>
 
 
 
 
 
37
  </div>
 
38
  <nav class="rmp-new-menu-step-conatiner">
39
  <ul class="rmp-new-menu-steps">
40
  <li class="rmp-new-menu-step current">
@@ -45,14 +52,15 @@ if ( ! empty( $global_settings['rmp_dark_mode'] ) ) {
45
  </li>
46
  </ul>
47
  </nav>
 
48
  <button class="close dashicons dashicons-no"></button>
49
  </div>
50
 
51
  <!-- This is menu create wizard setting sections. -->
52
  <div class="rmp-dialog-contents" >
53
-
54
  <div id="select-themes" class="rmp-new-menu-themes rmp-menu-section current">
55
  <div id="tabs" class="tabs">
 
56
  <!-- This is theme type list -->
57
  <ul class="nav-tab-wrapper">
58
  <li><a class="nav-tab rmp-v-divider" href="#tabs-1"><?php esc_html_e( 'Installed Themes', 'responsive-menu' ); ?></a></li>
@@ -60,7 +68,6 @@ if ( ! empty( $global_settings['rmp_dark_mode'] ) ) {
60
  <li><a class="nav-tab" href="#tabs-3"><?php esc_html_e( 'Saved Templates', 'responsive-menu' ); ?></a></li>
61
  <li style="float:right;"><button id="rmp-upload-new-theme" class="button btn-import-theme"><?php esc_html_e( 'Import', 'responsive-menu' ); ?></button></li>
62
  </ul>
63
-
64
  <!-- This is menu theme upload section -->
65
  <div id="rmp-menu-library-import" class="rmp-theme-upload-container hide" >
66
  <p><?php esc_html_e( 'If you have a menu theme in a .zip format, you can upload here.', 'responsive-menu' ); ?></p>
@@ -90,16 +97,31 @@ if ( ! empty( $global_settings['rmp_dark_mode'] ) ) {
90
  ?>
91
  </ul>
92
  </div>
 
93
 
94
  <!-- This is available theme list. -->
95
  <div id="tabs-1" class="rmp-themes">
96
- <?php $theme_manager->get_available_themes(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
97
  </div>
98
 
 
99
  <!-- This is saved template themes. -->
100
  <div id="tabs-3" class="rmp-themes">
101
  <?php $theme_manager->rmp_saves_theme_template_list(); ?>
102
  </div>
 
103
  </div>
104
  </div>
105
 
@@ -129,7 +151,6 @@ if ( ! empty( $global_settings['rmp_dark_mode'] ) ) {
129
  <div class="input-control">
130
  <select name="menu-to-use" id="rmp-menu-to-use">
131
  <?php
132
- $nav_menus = wp_get_nav_menus();
133
  foreach ( $nav_menus as $nav_menu ) {
134
  ?>
135
  <option value="<?php echo esc_attr( $nav_menu->slug ); ?>"><?php echo esc_html( $nav_menu->name ); ?></option>
@@ -258,7 +279,7 @@ if ( ! empty( $global_settings['rmp_dark_mode'] ) ) {
258
 
259
  </div>
260
  </div>
261
-
262
  <!-- This is menu create wizard footer. -->
263
  <div class="rmp-dialog-footer">
264
  <span class="spinner"></span>
@@ -270,7 +291,7 @@ if ( ! empty( $global_settings['rmp_dark_mode'] ) ) {
270
  <?php esc_html_e( 'Create Menu', 'responsive-menu' ); ?>
271
  </button>
272
  </div>
273
-
274
  </div>
275
  </section>
276
  </div>
23
  $classes = 'rmp-dark-mode';
24
  }
25
 
26
+ $nav_menus = wp_get_nav_menus();
27
  ?>
28
  <div class="<?php echo esc_attr( $classes ); ?>">
29
  <section id="rmp-new-menu-wizard" class="rmp-dialog-overlay rmp-new-menu-wizard" style="display:none">
30
  <div class="rmp-dialog-backdrop"></div>
31
+ <div class="rmp-dialog-wrap wp-clearfix <?php echo empty($nav_menus) ? 'rmp-menu-empty' : ''; ?>">
32
 
33
  <!-- This is new new wizard header -->
34
  <div class="rmp-dialog-header">
35
  <div class="title">
36
+ <?php if ( empty( $nav_menus ) ) { ?>
37
+ <img alt="logo" src="<?php echo esc_url( RMP_PLUGIN_URL_V4 . '/assets/images/rmp-warning.png' ); ?>" />
38
+ <span class="rm-text-primary"> <?php esc_html_e( 'WordPress menu missing', 'responsive-menu' ); ?> </span>
39
+ <?php }else { ?>
40
+ <img alt="logo" width="34" height="34" src="<?php echo esc_url( RMP_PLUGIN_URL_V4 . '/assets/images/rmp-logo.png' ); ?>" />
41
+ <span> <?php esc_html_e( 'Create New Menu', 'responsive-menu' ); ?> </span>
42
+ <?php } ?>
43
  </div>
44
+ <?php if ( ! empty( $nav_menus ) ) : ?>
45
  <nav class="rmp-new-menu-step-conatiner">
46
  <ul class="rmp-new-menu-steps">
47
  <li class="rmp-new-menu-step current">
52
  </li>
53
  </ul>
54
  </nav>
55
+ <?php endif; ?>
56
  <button class="close dashicons dashicons-no"></button>
57
  </div>
58
 
59
  <!-- This is menu create wizard setting sections. -->
60
  <div class="rmp-dialog-contents" >
 
61
  <div id="select-themes" class="rmp-new-menu-themes rmp-menu-section current">
62
  <div id="tabs" class="tabs">
63
+ <?php if ( ! empty( $nav_menus ) ) : ?>
64
  <!-- This is theme type list -->
65
  <ul class="nav-tab-wrapper">
66
  <li><a class="nav-tab rmp-v-divider" href="#tabs-1"><?php esc_html_e( 'Installed Themes', 'responsive-menu' ); ?></a></li>
68
  <li><a class="nav-tab" href="#tabs-3"><?php esc_html_e( 'Saved Templates', 'responsive-menu' ); ?></a></li>
69
  <li style="float:right;"><button id="rmp-upload-new-theme" class="button btn-import-theme"><?php esc_html_e( 'Import', 'responsive-menu' ); ?></button></li>
70
  </ul>
 
71
  <!-- This is menu theme upload section -->
72
  <div id="rmp-menu-library-import" class="rmp-theme-upload-container hide" >
73
  <p><?php esc_html_e( 'If you have a menu theme in a .zip format, you can upload here.', 'responsive-menu' ); ?></p>
97
  ?>
98
  </ul>
99
  </div>
100
+ <?php endif; ?>
101
 
102
  <!-- This is available theme list. -->
103
  <div id="tabs-1" class="rmp-themes">
104
+ <?php if ( ! empty( $nav_menus ) ) :
105
+ $theme_manager->get_available_themes();
106
+ else : ?>
107
+ <div class="rmp-admin-warning-notice">
108
+ <h2><?php esc_html_e( 'Looks like your WordPress website do not have any menus yet!', 'responsive-menu' ); ?></h2>
109
+ <p><?php esc_html_e( 'Responsive menu plugin requires at least one WordPress menu.', 'responsive-menu' ); ?>
110
+ <p><?php esc_html_e( 'Please create a new WordPress menu by using following button and try again.', 'responsive-menu' ); ?></p>
111
+ <div class="rmp-btn-group">
112
+ <a class="rmp-btn-primary" href="<?php echo esc_url( admin_url() . 'nav-menus.php' ); ?>"> <?php esc_html_e( 'Create WordPress Menu', 'responsive-menu' ); ?> </a>
113
+ <a class="rmp-btn-secondary" rel="noopener" target="_blank" href="<?php echo esc_url( 'https://responsive.menu/knowledgebase/create-a-wordpress-menu/' ); ?>"> <?php esc_html_e( 'Read Documention', 'responsive-menu' ); ?> </a>
114
+ </div>
115
+ </div>
116
+ <?php endif; ?>
117
  </div>
118
 
119
+ <?php if ( ! empty( $nav_menus ) ) : ?>
120
  <!-- This is saved template themes. -->
121
  <div id="tabs-3" class="rmp-themes">
122
  <?php $theme_manager->rmp_saves_theme_template_list(); ?>
123
  </div>
124
+ <?php endif; ?>
125
  </div>
126
  </div>
127
 
151
  <div class="input-control">
152
  <select name="menu-to-use" id="rmp-menu-to-use">
153
  <?php
 
154
  foreach ( $nav_menus as $nav_menu ) {
155
  ?>
156
  <option value="<?php echo esc_attr( $nav_menu->slug ); ?>"><?php echo esc_html( $nav_menu->name ); ?></option>
279
 
280
  </div>
281
  </div>
282
+ <?php if ( ! empty( $nav_menus ) ) : ?>
283
  <!-- This is menu create wizard footer. -->
284
  <div class="rmp-dialog-footer">
285
  <span class="spinner"></span>
291
  <?php esc_html_e( 'Create Menu', 'responsive-menu' ); ?>
292
  </button>
293
  </div>
294
+ <?php endif; ?>
295
  </div>
296
  </section>
297
  </div>