Skip to content

Commit

Permalink
Merge pull request #208 from ResponsiveMenu/dev
Browse files Browse the repository at this point in the history
Release 4.2.0
  • Loading branch information
etvarun authored Sep 8, 2022
2 parents b99b982 + 2455d80 commit 0cbddee
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 19 deletions.
11 changes: 7 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: expresstech, responsivemenu, imvarunkmr, surajkumarsingh, infosate
Tags: responsive, mega menu, navigation, mobile, hamburger
Requires at least: 3.6
Tested up to: 6.0
Stable tag: 4.1.12
Stable tag: 4.2.0
Requires PHP: 5.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -88,8 +88,6 @@ If you like this plugin, consider exploring our other themes and plugins:

⚡ [InstaWP](https://instawp.io/) - Launch a quick WordPress site with this sandbox service. Create New WordPress instance within a second.

🔒 [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.

== Installation ==

1. Upload `responsive-menu` to the `/wp-content/plugins/` directory
Expand Down Expand Up @@ -120,8 +118,13 @@ To view our FAQ, please go to [https://responsive.menu/faq/](https://responsive.

== Changelog ==

= 4.2.0 (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

= 4.1.12 (1st Aug 2022) =
* Bug: Fixed conflict issues with conflict with Multiple Page Generator Plugin
* Bug: Fixed conflict issues with Multiple Page Generator Plugin
* Enhancement: Added timestamps as a version to generated CSS/JSS urls

= 4.1.11 (25th May 2022) =
Expand Down
4 changes: 2 additions & 2 deletions responsive-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin Name: Responsive Menu
Plugin URI: https://expresstech.io
Description: Highly Customisable Responsive Menu Plugin for WordPress
Version: 4.1.12
Version: 4.2.0
Author: ExpressTech
Text Domain: responsive-menu
Author URI: https://responsive.menu
Expand All @@ -16,7 +16,7 @@
* Constant as plugin version.
*/
if ( ! defined( 'RMP_PLUGIN_VERSION' ) ) {
define( 'RMP_PLUGIN_VERSION', '4.1.12' );
define( 'RMP_PLUGIN_VERSION', '4.2.0' );
}

define( 'RESPONSIVE_MENU_URL', plugin_dir_url( __FILE__ ) );
Expand Down
63 changes: 62 additions & 1 deletion v4.0.0/assets/admin/scss/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -2048,6 +2048,68 @@ button.menu-save {
cursor: pointer;
}

#rmp-new-menu-wizard .rmp-dialog-wrap.wp-clearfix.rmp-menu-empty {
max-width: 470px;
margin-left: auto;
margin-right: auto;
top: 200px;
}

.rmp-menu-empty h2{
font-weight: 500;
font-size: 19px;
line-height: 22px;
letter-spacing: 0.05em;
color: #000000;
margin-bottom: 10px;
}

.rmp-dark-mode .rmp-menu-empty h2{
color: #fff;
}

.rmp-menu-empty .rmp-btn-group {
margin-top: 40px;
display: flex;
flex-wrap: wrap;
}

.rmp-menu-empty p{
font-weight: 500;
font-size: 14px;
line-height: 22px;
color: #7B8795;
}

.rmp-dark-mode .rmp-menu-empty p{
color: #c8c8c8;
}

#rmp-new-menu-wizard .rmp-dialog-wrap.rmp-menu-empty .rmp-dialog-contents {
min-height: auto;
padding: 0 30px;
}

.rmp-menu-empty .rmp-btn-primary ,
.rmp-menu-empty .rmp-btn-secondary {
background: #62BCF2;
border-radius: 5px;
border: none;
font-weight: 600;
font-size: 13px;
line-height: 16px;
padding: 10px 20px;
color: #fff;
margin-bottom: 15px;
margin-right: 15px;
}

.rmp-menu-empty .rmp-btn-secondary {
background: #DBE3EB;
color: #121C24;
padding: 10px 35px;
}

#rmp-menu-save-theme-wizard .rmp-dialog-contents {
display: flex;
justify-content: center;
Expand All @@ -2060,7 +2122,6 @@ button.menu-save {
margin: 5%;
}


.rmp-save-menu-input {
display: inline-flex;
margin-top: 20px;
Expand Down
Binary file added v4.0.0/assets/images/rmp-warning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions v4.0.0/inc/classes/class-style-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ protected function setup_hooks() {
add_action( 'rmp_theme_apply', array( $this, 'save_style_css_on_file' ), 10, 0 );
add_action( 'rmp_migrate_menu_style', array( $this, 'save_style_css_on_file' ), 10, 0 );
add_action( 'rmp_import_menu', array( $this, 'save_style_css_on_file' ), 10, 0 );
add_action('after_setup_theme', array( $this, 'rm_add_classic_menu_support' ) );

// Hide adminbar.
if ( 'hide' == $this->option_manager->get_global_option( 'menu_adjust_for_wp_admin_bar' ) ) {
Expand Down Expand Up @@ -1530,4 +1531,13 @@ public function get_common_scss_to_css() {
return new \WP_Error( 'Warning: Common style scss compile failed <br/> <br />' . $e->getMessage() );
}
}

/**
* Adding theme support for menus
*
* @since 4.2.0
*/
public function rm_add_classic_menu_support() {
add_theme_support( 'menus' );
}
}
6 changes: 3 additions & 3 deletions v4.0.0/inc/helpers/custom-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function rmp_get_list_of_pages() {
foreach ( $posts as $post ) {
$all_pages[ $post->ID ] = $post->post_title;
}

wp_reset_postdata();
return $all_pages;
}

Expand Down Expand Up @@ -107,7 +107,7 @@ function get_all_rmp_menu_ids() {
$menu_ids[] = $menu->ID;
}
}

wp_reset_postdata();
return $menu_ids;
}

Expand All @@ -133,7 +133,7 @@ function rmp_get_all_menus() {
$menus[ $menu->ID ] = $menu->post_title;
}
}

wp_reset_postdata();
return $menus;
}

Expand Down
39 changes: 30 additions & 9 deletions v4.0.0/templates/new-menu-wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,25 @@
$classes = 'rmp-dark-mode';
}

$nav_menus = wp_get_nav_menus();
?>
<div class="<?php echo esc_attr( $classes ); ?>">
<section id="rmp-new-menu-wizard" class="rmp-dialog-overlay rmp-new-menu-wizard" style="display:none">
<div class="rmp-dialog-backdrop"></div>
<div class="rmp-dialog-wrap wp-clearfix">
<div class="rmp-dialog-wrap wp-clearfix <?php echo empty($nav_menus) ? 'rmp-menu-empty' : ''; ?>">

<!-- This is new new wizard header -->
<div class="rmp-dialog-header">
<div class="title">
<img alt="logo" width="34" height="34" src="<?php echo esc_url( RMP_PLUGIN_URL_V4 . '/assets/images/rmp-logo.png' ); ?>" />
<span> <?php esc_html_e( 'Create New Menu', 'responsive-menu' ); ?> </span>
<?php if ( empty( $nav_menus ) ) { ?>
<img alt="logo" src="<?php echo esc_url( RMP_PLUGIN_URL_V4 . '/assets/images/rmp-warning.png' ); ?>" />
<span class="rm-text-primary"> <?php esc_html_e( 'WordPress menu missing', 'responsive-menu' ); ?> </span>
<?php }else { ?>
<img alt="logo" width="34" height="34" src="<?php echo esc_url( RMP_PLUGIN_URL_V4 . '/assets/images/rmp-logo.png' ); ?>" />
<span> <?php esc_html_e( 'Create New Menu', 'responsive-menu' ); ?> </span>
<?php } ?>
</div>
<?php if ( ! empty( $nav_menus ) ) : ?>
<nav class="rmp-new-menu-step-conatiner">
<ul class="rmp-new-menu-steps">
<li class="rmp-new-menu-step current">
Expand All @@ -45,22 +52,22 @@
</li>
</ul>
</nav>
<?php endif; ?>
<button class="close dashicons dashicons-no"></button>
</div>

<!-- This is menu create wizard setting sections. -->
<div class="rmp-dialog-contents" >

<div id="select-themes" class="rmp-new-menu-themes rmp-menu-section current">
<div id="tabs" class="tabs">
<?php if ( ! empty( $nav_menus ) ) : ?>
<!-- This is theme type list -->
<ul class="nav-tab-wrapper">
<li><a class="nav-tab rmp-v-divider" href="#tabs-1"><?php esc_html_e( 'Installed Themes', 'responsive-menu' ); ?></a></li>
<li><a class="nav-tab rmp-v-divider <?php echo esc_attr( $rmp_browse_class ); ?>" href="#tabs-2"><?php esc_html_e( 'Marketplace', 'responsive-menu' ); ?></a></li>
<li><a class="nav-tab" href="#tabs-3"><?php esc_html_e( 'Saved Templates', 'responsive-menu' ); ?></a></li>
<li style="float:right;"><button id="rmp-upload-new-theme" class="button btn-import-theme"><?php esc_html_e( 'Import', 'responsive-menu' ); ?></button></li>
</ul>

<!-- This is menu theme upload section -->
<div id="rmp-menu-library-import" class="rmp-theme-upload-container hide" >
<p><?php esc_html_e( 'If you have a menu theme in a .zip format, you can upload here.', 'responsive-menu' ); ?></p>
Expand Down Expand Up @@ -90,16 +97,31 @@
?>
</ul>
</div>
<?php endif; ?>

<!-- This is available theme list. -->
<div id="tabs-1" class="rmp-themes">
<?php $theme_manager->get_available_themes(); ?>
<?php if ( ! empty( $nav_menus ) ) :
$theme_manager->get_available_themes();
else : ?>
<div class="rmp-admin-warning-notice">
<h2><?php esc_html_e( 'Looks like your WordPress website do not have any menus yet!', 'responsive-menu' ); ?></h2>
<p><?php esc_html_e( 'Responsive menu plugin requires at least one WordPress menu.', 'responsive-menu' ); ?>
<p><?php esc_html_e( 'Please create a new WordPress menu by using following button and try again.', 'responsive-menu' ); ?></p>
<div class="rmp-btn-group">
<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>
<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>
</div>
</div>
<?php endif; ?>
</div>

<?php if ( ! empty( $nav_menus ) ) : ?>
<!-- This is saved template themes. -->
<div id="tabs-3" class="rmp-themes">
<?php $theme_manager->rmp_saves_theme_template_list(); ?>
</div>
<?php endif; ?>
</div>
</div>

Expand Down Expand Up @@ -129,7 +151,6 @@
<div class="input-control">
<select name="menu-to-use" id="rmp-menu-to-use">
<?php
$nav_menus = wp_get_nav_menus();
foreach ( $nav_menus as $nav_menu ) {
?>
<option value="<?php echo esc_attr( $nav_menu->slug ); ?>"><?php echo esc_html( $nav_menu->name ); ?></option>
Expand Down Expand Up @@ -258,7 +279,7 @@

</div>
</div>

<?php if ( ! empty( $nav_menus ) ) : ?>
<!-- This is menu create wizard footer. -->
<div class="rmp-dialog-footer">
<span class="spinner"></span>
Expand All @@ -270,7 +291,7 @@
<?php esc_html_e( 'Create Menu', 'responsive-menu' ); ?>
</button>
</div>

<?php endif; ?>
</div>
</section>
</div>

0 comments on commit 0cbddee

Please sign in to comment.