Skip to content

Commit

Permalink
Merge pull request #243 from ResponsiveMenu/dev
Browse files Browse the repository at this point in the history
Release 4.3.0
  • Loading branch information
etvarun authored May 16, 2023
2 parents 3c84cf4 + 09246dd commit 53cc4a5
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 21 deletions.
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: expresstech, responsivemenu, imvarunkmr, moha12351, infosatech
Tags: responsive, mega menu, navigation, mobile, hamburger
Requires at least: 3.6
Tested up to: 6.2
Stable tag: 4.2.3
Stable tag: 4.3.0
Requires PHP: 5.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -115,6 +115,10 @@ To view our FAQ, please go to [https://responsive.menu/faq/](https://responsive.
7. Main menu

== Changelog ==
= 4.3.0 (16th May 2023) =
* Enhancement: The tablet default breakpoints have been adjusted to improve responsiveness
* Enhancement: Improved UX

= 4.2.3 (29th Mar 2023) =
* Bug: Fixed PHP warnings
* Enhancement: Checked compatibility with WordPress 6.2
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.2.3
Version: 4.3.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.2.3' );
define( 'RMP_PLUGIN_VERSION', '4.3.0' );
}

define( 'RESPONSIVE_MENU_URL', plugin_dir_url( __FILE__ ) );
Expand Down
4 changes: 2 additions & 2 deletions v4.0.0/inc/classes/class-control-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ public function add_device_visibility_control( $options ) {
<div class="rmp-input-control-wrapper full-size">
<label class="rmp-input-control-label">
<?php esc_html_e( 'Device Visibility', 'responsive-menu' ); ?>
<a target="_blank" rel="noopener" class="upgrade-tooltip" href="<?php echo esc_url( $this->pro_plugin_url ); ?>" > PRO </a>
<a target="_blank" rel="noopener" class="upgrade-tooltip" href="<?php echo esc_url( $this->pro_plugin_url ); ?>" > <?php esc_html_e( 'PRO', 'responsive-menu' ); ?> </a>
</label>
<div class="rmp-input-control">
<div class="device-icons-group">
Expand Down Expand Up @@ -1124,7 +1124,7 @@ protected function get_device_options() {
WP_Filesystem();
?>
<div class="rmp-device-switcher-holder">
<a target="_blank" rel="noopener" class="upgrade-tooltip" href="<?php echo esc_url( $this->pro_plugin_url ); ?>" > PRO </a>
<a target="_blank" rel="noopener" class="upgrade-tooltip" href="<?php echo esc_url( $this->pro_plugin_url ); ?>" > <?php esc_html_e( 'PRO', 'responsive-menu' ); ?> </a>
<ul class="select rmp-device-switcher" >
<li data-device="mobile">
<?php
Expand Down
4 changes: 3 additions & 1 deletion v4.0.0/inc/classes/class-rmp-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ public function menu_trigger() {

$toggle_theme_class = apply_filters( 'rmp_menu_toggle_classes', array( 'rmp_menu_trigger', $trigger_click_animation ), $this->menu_id );
$toggle_theme_class = implode( ' ', $toggle_theme_class );

if ( wp_is_mobile() ) {
$toggle_theme_class .= ' rmp-mobile-device-menu';
}
$menu_trigger_destination = '';
if ( ! empty( $this->options['hamburger_position_selector'] ) ) {
$menu_trigger_destination = 'data-destination=' . $this->options['hamburger_position_selector'];
Expand Down
51 changes: 51 additions & 0 deletions v4.0.0/inc/helpers/custom-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,54 @@ function rm_sanitize_rec_array( $array, $textarea = false ) {
}
return $array;
}

/**
* Add RM customize button for admin menus
* @since 4.3.0
*/
function add_rm_customize_button_to_save_menu() {
global $pagenow;
if ( 'edit.php' === $pagenow && ! empty( $_REQUEST['post_type'] ) && ! empty( $_REQUEST['open'] ) && 'rmp_menu' === $_REQUEST['post_type'] && 'wizard' === $_REQUEST['open'] ) {
$inline_script = "jQuery('#rmp-new-menu-wizard').fadeIn();";
if ( ! empty( $_REQUEST['menu-to-use'] ) ) {
$inline_script .= "jQuery('#rmp-menu-to-use').val('".esc_attr( sanitize_text_field( wp_unslash( $_REQUEST['menu-to-use'] ) ) ) ."' );";
}
wp_add_inline_script( 'rmp_admin_scripts', $inline_script );
}
// Check if it's the admin menu page
if ( 'nav-menus.php' === $pagenow ) {
$menu_id = isset($_REQUEST['menu']) ? sanitize_text_field( wp_unslash( intval( $_REQUEST['menu'] ) ) ) : absint( get_user_option( 'nav_menu_recently_edited' ) );
$nav_menus = wp_get_nav_menus();
if ( ( empty( $menu_id ) || ! is_nav_menu( $menu_id ) ) && 0 < count( $nav_menus ) ) {
$menu_id = $nav_menus[0]->term_id;
}
$rmp_customize_menu = admin_url( 'edit.php?post_type=rmp_menu&open=wizard' );
if ( ! empty( $menu_id ) && is_nav_menu( $menu_id ) ) {
$rmp_customize_menu = admin_url( 'edit.php?post_type=rmp_menu&open=wizard&menu-to-use='.esc_attr( $menu_id ) );
$query = new WP_Query(array(
'post_type' => 'rmp_menu',
'posts_per_page' => 1,
'meta_query' => array(
array(
'key' => 'rmp_menu_meta',
'value' => '"menu_to_use";s:'.strlen( $menu_id ).':"'. esc_sql( $menu_id ).'";',
'compare' => 'LIKE',
),
),
));
if ( $query->have_posts() ) {
$query->the_post();
$post_id = get_the_ID();
wp_reset_postdata();
$rmp_customize_menu = admin_url( 'post.php?post='.esc_attr( $post_id ).'&action=edit&editor=true' );
}
}
$inline_script = "jQuery(document).ready(function($) {
$('#save_menu_footer').before('<a href=\"".esc_url( $rmp_customize_menu )."\" style=\"margin-right:5px;\" class=\"button button-secondary button-large rmp-customize-menu\">". __('Customize Menu', 'responsive-menu') ."</a>');
});";
// Enqueue the script
wp_add_inline_script( 'admin-bar', $inline_script );
}
}
add_action('admin_footer', 'add_rm_customize_button_to_save_menu', 999);

3 changes: 2 additions & 1 deletion v4.0.0/inc/helpers/default-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ function rmp_get_default_options() {
'header_bar_scroll_enable' => 'off',
'header_bar_scroll_background_color' => '#36bdf6',
'mobile_breakpoint' => '600',
'tablet_breakpoint' => '8000',
'tablet_breakpoint' => '1024',
'transition_speed' => '0.5',
'sub_menu_speed' => '0.2',
'show_menu_on_page_load' => 'off',
Expand Down Expand Up @@ -1020,6 +1020,7 @@ function rmp_get_default_options() {
'menu_additional_content_alignment' => 'center',
'menu_additional_content_colour' => '#6fda44',
'menu_search_box_text' => 'Search',
'menu_search_box_code' => '',
'menu_search_section_padding' =>
array(
'top' => '5%',
Expand Down
15 changes: 13 additions & 2 deletions v4.0.0/templates/menu-elements/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,22 @@
<label class="rmp-input-control-label">
<?php esc_html_e( 'Placeholder Text', 'responsive-menu' ); ?>
<span>
<a target="_blank" rel="noopener" class="upgrade-tooltip" href="https://responsive.menu/pricing?utm_source=free-plugin&utm_medium=option&utm_campaign=hide_on_mobile" > PRO </a>
<a target="_blank" rel="noopener" class="upgrade-tooltip" href="https://responsive.menu/pricing?utm_source=free-plugin&utm_medium=option&utm_campaign=hide_on_mobile" > <?php esc_html_e( 'PRO', 'responsive-menu' ); ?> </a>
</span>
</label>
<div class="rmp-input-control">
<input disabled placeholder="Search" type="text" id="rmp-menu-search-box-text" name="menu[menu_search_box_text]" class="regular-text" value="<?php echo esc_attr( rmp_get_value( $options, 'menu_search_box_text' ) ); ?>"/>
<input disabled placeholder="<?php esc_html_e( 'Search', 'responsive-menu' ); ?>" type="text" id="rmp-menu-search-box-text" name="menu[menu_search_box_text]" class="regular-text" value="<?php echo esc_attr( rmp_get_value( $options, 'menu_search_box_text' ) ); ?>"/>
</div>
</div>
<div class="rmp-input-control-wrapper full-size">
<label class="rmp-input-control-label">
<?php esc_html_e( 'Custome search code', 'responsive-menu' ); ?>
<span>
<a target="_blank" rel="noopener" class="upgrade-tooltip" href="https://responsive.menu/pricing?utm_source=free-plugin&utm_medium=option&utm_campaign=hide_on_mobile" > <?php esc_html_e( 'PRO', 'responsive-menu' ); ?> </a>
</span>
</label>
<div class="rmp-input-control">
<textarea disabled placeholder="<?php esc_html_e( 'Add your custome search code..', 'responsive-menu' ); ?>" id="rmp-menu-search-box-code" name="menu[menu_search_box_code]" class="regular-text"><?php echo esc_attr( rmp_get_value( $options, 'menu_search_box_code' ) ); ?></textarea>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions v4.0.0/templates/new-menu-wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
<?php
foreach ( $nav_menus as $nav_menu ) {
?>
<option value="<?php echo esc_attr( $nav_menu->slug ); ?>"><?php echo esc_html( $nav_menu->name ); ?></option>
<option value="<?php echo esc_attr( $nav_menu->term_id ); ?>"><?php echo esc_html( $nav_menu->name ); ?></option>
<?php
}
?>
Expand Down Expand Up @@ -195,7 +195,7 @@
<div class="rmp-input-control-label input-label">
<h4 class="input-label-title">
<span> <?php esc_html_e( 'Device Visibility', 'responsive-menu' ); ?> </span>
<a target="_blank" rel="noopener" class="upgrade-tooltip" href="https://responsive.menu/pricing?utm_source=free-plugin&utm_medium=option&utm_campaign=hide_on_mobile" > PRO </a>
<a target="_blank" rel="noopener" class="upgrade-tooltip" href="https://responsive.menu/pricing?utm_source=free-plugin&utm_medium=option&utm_campaign=hide_on_mobile" > <?php esc_html_e( 'PRO', 'responsive-menu' ); ?> </a>
</h4>

<p class="input-label-description">
Expand Down
6 changes: 4 additions & 2 deletions v4.0.0/templates/rmp-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
$editor = Editor::get_instance();
$menu_id = get_the_ID();
$options = $option_manager->get_options( $menu_id );
$menu_to_use = $option_manager->get_option( $menu_id, 'menu_to_use' );
$current_wp_menu = wp_get_nav_menu_object($menu_to_use);
global $wp_filesystem;
if ( empty( $wp_filesystem ) ) {
require_once ABSPATH . 'wp-admin/includes/file.php';
Expand Down Expand Up @@ -502,7 +504,7 @@
$nav_menus = wp_get_nav_menus();
$wp_menu_list = array();
foreach ( $nav_menus as $nav_menu ) {
$wp_menu_list[ $nav_menu->slug ] = $nav_menu->name;
$wp_menu_list[ $nav_menu->term_id ] = $nav_menu->name;
}
$control_manager->add_select_control(
array(
Expand All @@ -513,7 +515,7 @@
),
'name' => 'menu[menu_to_use]',
'options' => $wp_menu_list,
'value' => rmp_get_value( $options, 'menu_to_use' ),
'value' => $current_wp_menu->term_id,
)
);
$ui_manager->end_group_controls();
Expand Down
10 changes: 5 additions & 5 deletions v4.0.0/templates/rmp-wizards.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,31 @@
<li>
<a class="nav-tab" href="#material-icon">
<?php esc_html_e( 'Material Icons (mdi)', 'responsive-menu' ); ?>
<span class="upgrade-tooltip"> PRO </span>
<span class="upgrade-tooltip"> <?php esc_html_e( 'PRO', 'responsive-menu' ); ?> </span>
</a>
</li>
<li>
<a class="nav-tab" href="#fas">
<?php esc_html_e( 'FontAwesome Solid (fas)', 'responsive-menu' ); ?>
<span class="upgrade-tooltip"> PRO </span>
<span class="upgrade-tooltip"> <?php esc_html_e( 'PRO', 'responsive-menu' ); ?> </span>
</a>
</li>
<li>
<a class="nav-tab" href="#fab">
<?php esc_html_e( 'FontAwesome Brand (fab)', 'responsive-menu' ); ?>
<span class="upgrade-tooltip"> PRO </span>
<span class="upgrade-tooltip"> <?php esc_html_e( 'PRO', 'responsive-menu' ); ?> </span>
</a>
</li>
<li>
<a class="nav-tab" href="#far">
<?php esc_html_e( 'FontAwesome Regular (far)', 'responsive-menu' ); ?>
<span class="upgrade-tooltip"> PRO </span>
<span class="upgrade-tooltip"> <?php esc_html_e( 'PRO', 'responsive-menu' ); ?> </span>
</a>
</li>
<li>
<a class="nav-tab" href="#glyphicons">
<?php esc_html_e( 'GlyphIcon', 'responsive-menu' ); ?>
<span class="upgrade-tooltip"> PRO </span>
<span class="upgrade-tooltip"> <?php esc_html_e( 'PRO', 'responsive-menu' ); ?> </span>
</a>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion v4.0.0/themes/electric blue theme/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"header_bar_position_type":"fixed",
"header_bar_adjust_page":"off",
"mobile_breakpoint":"687",
"tablet_breakpoint":"8000",
"tablet_breakpoint":"1024",
"transition_speed":"0.5",
"sub_menu_speed":"0.2",
"show_menu_on_page_load":"off",
Expand Down
2 changes: 1 addition & 1 deletion v4.0.0/themes/full-width-theme/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"header_bar_position_type":"fixed",
"header_bar_adjust_page":"off",
"mobile_breakpoint":"687",
"tablet_breakpoint":"8000",
"tablet_breakpoint":"1024",
"transition_speed":"0.5",
"sub_menu_speed":"0.2",
"show_menu_on_page_load":"off",
Expand Down
2 changes: 1 addition & 1 deletion v4.0.0/themes/simple-red-free/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"header_bar_position_type":"fixed",
"header_bar_adjust_page":"off",
"mobile_breakpoint":"687",
"tablet_breakpoint":"8000",
"tablet_breakpoint":"1024",
"transition_speed":"0.5",
"sub_menu_speed":"0.2",
"show_menu_on_page_load":"off",
Expand Down

0 comments on commit 53cc4a5

Please sign in to comment.