Version Description
(25th June 2021) =
Bug: Fixed Adjust Page option issue
Bug: Fixed the issue of conflict with WooCommerce plugin
Bug: Fixed the issue of wrong button text position
Feature: Added banner for providing plugin feedback
Enhancement: Renamed Roadmap
to What's Next
Download this release
Release Info
Developer | expresstech |
Plugin | Responsive Menu |
Version | 4.1.3 |
Comparing to | |
See all releases |
Code changes from version 4.1.2 to 4.1.3
- readme.txt +11 -4
- responsive-menu.php +5 -3
- review-banner-class.php +129 -0
- v4.0.0/assets/scss/main.scss +23 -13
- v4.0.0/inc/classes/class-admin.php +9 -6
- v4.0.0/inc/classes/class-theme-manager.php +66 -20
- v4.0.0/templates/rmp-roadmap.php +3 -3
- v4.0.0/templates/rmp-wizards.php +1 -1
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Responsive Menu - Create Mobile-Friendly Menu ===
|
2 |
-
Contributors: expresstech,responsivemenu,imvarunkmr,surajkumarsingh
|
3 |
Tags: responsive, mega menu, navigation, mobile, hamburger
|
4 |
Requires at least: 3.6
|
5 |
Tested up to: 5.7
|
6 |
-
Stable tag: 4.1.
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -102,7 +102,14 @@ To view our FAQ, please go to [https://responsive.menu/faq/](https://responsive.
|
|
102 |
7. Main menu
|
103 |
|
104 |
== Changelog ==
|
105 |
-
= 4.1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
Feature: Added dark mode option for menu customizer
|
107 |
Enhancement: Added new filter rmp_menu_markups
|
108 |
Enhancement: Added demo links for free themes
|
@@ -716,4 +723,4 @@ Bug: Fixed PHP warning and errors
|
|
716 |
Requires PHP 5.4 - DO NOT upgrade if you do not have this installed.
|
717 |
|
718 |
= 2.8.8 =
|
719 |
-
Requires PHP 5.4 - DO NOT upgrade if you do not have this installed.
|
1 |
=== Responsive Menu - Create Mobile-Friendly Menu ===
|
2 |
+
Contributors: expresstech, responsivemenu, imvarunkmr, surajkumarsingh, infosatech
|
3 |
Tags: responsive, mega menu, navigation, mobile, hamburger
|
4 |
Requires at least: 3.6
|
5 |
Tested up to: 5.7
|
6 |
+
Stable tag: 4.1.3
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
102 |
7. Main menu
|
103 |
|
104 |
== Changelog ==
|
105 |
+
= 4.1.3 (25th June 2021) =
|
106 |
+
Bug: Fixed Adjust Page option issue
|
107 |
+
Bug: Fixed the issue of conflict with WooCommerce plugin
|
108 |
+
Bug: Fixed the issue of wrong button text position
|
109 |
+
Feature: Added banner for providing plugin feedback
|
110 |
+
Enhancement: Renamed `Roadmap` to `What's Next`
|
111 |
+
|
112 |
+
= 4.1.2 (1st May 2021) =
|
113 |
Feature: Added dark mode option for menu customizer
|
114 |
Enhancement: Added new filter rmp_menu_markups
|
115 |
Enhancement: Added demo links for free themes
|
723 |
Requires PHP 5.4 - DO NOT upgrade if you do not have this installed.
|
724 |
|
725 |
= 2.8.8 =
|
726 |
+
Requires PHP 5.4 - DO NOT upgrade if you do not have this installed.
|
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.
|
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.
|
20 |
}
|
21 |
|
22 |
define('RESPONSIVE_MENU_URL', plugin_dir_url( __FILE__ ) );
|
@@ -255,4 +255,6 @@ include dirname(__FILE__) . '/config/polylang.php';
|
|
255 |
}
|
256 |
|
257 |
rm_includes_menu_theme_template();
|
258 |
-
}
|
|
|
|
4 |
Plugin Name: Responsive Menu
|
5 |
Plugin URI: https://expresstech.io
|
6 |
Description: Highly Customisable Responsive Menu Plugin for WordPress
|
7 |
+
Version: 4.1.3
|
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.1.3' );
|
20 |
}
|
21 |
|
22 |
define('RESPONSIVE_MENU_URL', plugin_dir_url( __FILE__ ) );
|
255 |
}
|
256 |
|
257 |
rm_includes_menu_theme_template();
|
258 |
+
}
|
259 |
+
|
260 |
+
include( 'review-banner-class.php' );
|
review-banner-class.php
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Class that handles displaying of review notice
|
5 |
+
*
|
6 |
+
* @since 4.1.3
|
7 |
+
*/
|
8 |
+
class RM_Review_Message {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Variable to hold how many results needed to show message
|
12 |
+
*
|
13 |
+
* @since 4.1.3
|
14 |
+
*/
|
15 |
+
public $trigger = -1;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Main Construct Function
|
19 |
+
*
|
20 |
+
* Adds the notice check to init and then check to display message
|
21 |
+
*
|
22 |
+
* @since 4.1.3
|
23 |
+
*/
|
24 |
+
function __construct() {
|
25 |
+
$this->add_hooks();
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Adds check message to admin_init hook
|
30 |
+
*
|
31 |
+
* @since 4.1.3
|
32 |
+
*/
|
33 |
+
public function add_hooks() {
|
34 |
+
add_action( 'admin_init', array( $this, 'check_message_display' ) );
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Checks if message should be displayed
|
39 |
+
*
|
40 |
+
* @since 4.1.3
|
41 |
+
*/
|
42 |
+
public function check_message_display() {
|
43 |
+
$this->admin_notice_check();
|
44 |
+
$this->trigger = $this->check_message_trigger();
|
45 |
+
if ( $this->trigger !== -1 ) {
|
46 |
+
$amount = $this->check_results_amount();
|
47 |
+
if ( $amount >= $this->trigger ) {
|
48 |
+
add_action( 'admin_notices', array( $this, 'display_admin_message' ) );
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Retrieves what the next trigger value is
|
55 |
+
*
|
56 |
+
* @since 4.1.3
|
57 |
+
* @return int The amount of menus needed to display message
|
58 |
+
*/
|
59 |
+
public function check_message_trigger() {
|
60 |
+
$trigger = get_option( 'rm_review_message_trigger' );
|
61 |
+
if ( empty( $trigger ) || is_null( $trigger ) ) {
|
62 |
+
add_option('rm_review_message_trigger', 1 );
|
63 |
+
return 1;
|
64 |
+
}
|
65 |
+
return intval( $trigger );
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Checks the amount of Menus
|
70 |
+
*
|
71 |
+
* @return int The amount of menus
|
72 |
+
*/
|
73 |
+
public function check_results_amount() {
|
74 |
+
global $wpdb;
|
75 |
+
$amount = $wpdb->get_var("SELECT COUNT(*) FROM `". $wpdb->prefix ."posts`
|
76 |
+
WHERE post_type = 'rmp_menu'");
|
77 |
+
return $amount;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Displays the message
|
82 |
+
*
|
83 |
+
* Displays the message asking for review
|
84 |
+
*
|
85 |
+
*
|
86 |
+
*/
|
87 |
+
public function display_admin_message() {
|
88 |
+
$already_url = esc_url( add_query_arg( 'rm_review_notice_check', 'already_did' ) );
|
89 |
+
$nope_url = esc_url( add_query_arg( 'rm_review_notice_check', 'remove_message' ) );
|
90 |
+
echo "<div class='updated'><br />";
|
91 |
+
echo sprintf( __('Greetings! I just noticed that you have created %d Menus. That is
|
92 |
+
awesome! Could you please help me out by giving this plugin a 5-star rating on WordPress? This
|
93 |
+
will help us by helping other users discover this plugin. %s', 'responsive-menu-pro'),
|
94 |
+
$this->check_results_amount(),
|
95 |
+
'<br /><strong><em>~ RM Team</em></strong><br /><br />'
|
96 |
+
);
|
97 |
+
echo ' <a target="_blank" href="https://wordpress.org/support/plugin/responsive-menu/reviews/#new-topic-0" class="button-primary">' . __( 'Yeah, you deserve it!', 'responsive-menu-pro' ) . '</a>';
|
98 |
+
echo ' <a href="' . esc_url( $already_url ) . '" class="button-secondary">' . __( 'I already did!', 'responsive-menu-pro' ) . '</a>';
|
99 |
+
echo ' <a href="' . esc_url( $nope_url ) . '" class="button-secondary">' . __( 'No, this plugin is not good enough', 'responsive-menu-pro' ) . '</a>';
|
100 |
+
echo "<br /><br /></div>";
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Checks if a link in the admin message has been clicked
|
105 |
+
*
|
106 |
+
* @since 4.1.3
|
107 |
+
*/
|
108 |
+
public function admin_notice_check() {
|
109 |
+
if ( isset( $_GET["rm_review_notice_check"] ) && $_GET["rm_review_notice_check"] == 'remove_message' ) {
|
110 |
+
$this->trigger = $this->check_message_trigger();
|
111 |
+
$update_trigger = -1;
|
112 |
+
if ( $this->trigger === -1 ) {
|
113 |
+
exit;
|
114 |
+
} else if ( $this->trigger === 1 ) {
|
115 |
+
$update_trigger = 5;
|
116 |
+
} else if ( $this->trigger === 5 ) {
|
117 |
+
$update_trigger = 10;
|
118 |
+
} else if ( $this->trigger === 10 ) {
|
119 |
+
$update_trigger = -1;
|
120 |
+
}
|
121 |
+
update_option( 'rm_review_message_trigger', $update_trigger );
|
122 |
+
}
|
123 |
+
if ( isset( $_GET["rm_review_notice_check"] ) && $_GET["rm_review_notice_check"] == 'already_did' ) {
|
124 |
+
update_option( 'rm_review_message_trigger', -1 );
|
125 |
+
}
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
$rm_review_message = new RM_Review_Message();
|
v4.0.0/assets/scss/main.scss
CHANGED
@@ -67,21 +67,31 @@
|
|
67 |
display: none;
|
68 |
}
|
69 |
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
86 |
.responsive-menu-pro-inner {
|
87 |
display: block;
|
67 |
display: none;
|
68 |
}
|
69 |
|
70 |
+
.rmp-trigger-label {
|
71 |
+
color: $menu_trigger_title_color;
|
72 |
+
pointer-events: none;
|
73 |
+
line-height: $menu_trigger_title_line_height;
|
74 |
|
75 |
+
@if( $menu_trigger_title_font != '' ) {
|
76 |
+
font-family: $menu_trigger_title_font;
|
77 |
+
} @else {
|
78 |
+
font-family: inherit
|
79 |
+
}
|
80 |
|
81 |
+
font-size: $menu_trigger_title_font_size;
|
82 |
+
display: inline;
|
83 |
+
text-transform: inherit;
|
84 |
+
|
85 |
+
&.rmp-trigger-label-top {
|
86 |
+
display: block;
|
87 |
+
margin-bottom: 12px;
|
88 |
+
}
|
89 |
+
|
90 |
+
&.rmp-trigger-label-bottom {
|
91 |
+
display: block;
|
92 |
+
margin-top: 12px;
|
93 |
+
}
|
94 |
+
}
|
95 |
|
96 |
.responsive-menu-pro-inner {
|
97 |
display: block;
|
v4.0.0/inc/classes/class-admin.php
CHANGED
@@ -308,10 +308,10 @@ class Admin {
|
|
308 |
|
309 |
add_submenu_page (
|
310 |
'edit.php?post_type=rmp_menu',
|
311 |
-
__( '
|
312 |
-
__( '
|
313 |
'manage_options',
|
314 |
-
'
|
315 |
array( $this, 'rmp_roadmap_admin_page' )
|
316 |
);
|
317 |
|
@@ -382,7 +382,10 @@ class Admin {
|
|
382 |
* @return void
|
383 |
*/
|
384 |
public function add_new_menu_widget() {
|
385 |
-
|
|
|
|
|
|
|
386 |
}
|
387 |
|
388 |
/**
|
@@ -398,7 +401,7 @@ class Admin {
|
|
398 |
|
399 |
if ( 'rmp_menu' == $post->post_type ) {
|
400 |
$actions['edit'] = sprintf(
|
401 |
-
'<a href="%s" aria-label="Edit"
|
402 |
esc_url( get_edit_post_link( $post->ID ) ),
|
403 |
__( 'Customize', 'responsive-menu-pro' )
|
404 |
);
|
@@ -462,7 +465,7 @@ class Admin {
|
|
462 |
|
463 |
case 'actions' :
|
464 |
echo sprintf(
|
465 |
-
'<a href="%s" class="button" aria-label="Customize"
|
466 |
esc_url( get_edit_post_link( $post_id) ),
|
467 |
__( 'Customize', 'responsive-menu-pro' )
|
468 |
);
|
308 |
|
309 |
add_submenu_page (
|
310 |
'edit.php?post_type=rmp_menu',
|
311 |
+
__( 'What\'s Next', 'responsive-menu-pro' ),
|
312 |
+
__( 'What\'s Next', 'responsive-menu-pro' ),
|
313 |
'manage_options',
|
314 |
+
'whats-next',
|
315 |
array( $this, 'rmp_roadmap_admin_page' )
|
316 |
);
|
317 |
|
382 |
* @return void
|
383 |
*/
|
384 |
public function add_new_menu_widget() {
|
385 |
+
$screen = get_current_screen();
|
386 |
+
if ( $screen->id === 'edit-rmp_menu' ) {
|
387 |
+
include_once RMP_PLUGIN_PATH_V4 . '/templates/new-menu-wizard.php';
|
388 |
+
}
|
389 |
}
|
390 |
|
391 |
/**
|
401 |
|
402 |
if ( 'rmp_menu' == $post->post_type ) {
|
403 |
$actions['edit'] = sprintf(
|
404 |
+
'<a href="%s" aria-label="Edit">%s</a>',
|
405 |
esc_url( get_edit_post_link( $post->ID ) ),
|
406 |
__( 'Customize', 'responsive-menu-pro' )
|
407 |
);
|
465 |
|
466 |
case 'actions' :
|
467 |
echo sprintf(
|
468 |
+
'<a href="%s" class="button" aria-label="Customize">%s</a>',
|
469 |
esc_url( get_edit_post_link( $post_id) ),
|
470 |
__( 'Customize', 'responsive-menu-pro' )
|
471 |
);
|
v4.0.0/inc/classes/class-theme-manager.php
CHANGED
@@ -571,13 +571,13 @@ class Theme_Manager {
|
|
571 |
return $html;
|
572 |
}
|
573 |
|
574 |
-
|
575 |
* Design the theme list which are from stored.
|
576 |
*
|
577 |
* @since 4.0.0
|
578 |
* @return HTML|string $html
|
579 |
*/
|
580 |
-
public function get_themes_from_theme_store() {
|
581 |
|
582 |
$themes = $this->get_themes_by_api();
|
583 |
$uploaded_themes = $this->get_uploaded_theme_dir();
|
@@ -600,15 +600,39 @@ class Theme_Manager {
|
|
600 |
}
|
601 |
|
602 |
$demo_link = '';
|
603 |
-
if ( ! empty( $theme['demo_link'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
604 |
$demo_link = sprintf(
|
605 |
'<a href="%s" alt="%s" target="_blank" class="button">%s</a>',
|
606 |
-
esc_url( $
|
607 |
esc_attr( $theme['name'] ),
|
608 |
__( 'View Demo','responsive-menu-pro' )
|
609 |
);
|
610 |
}
|
611 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
612 |
$html .= sprintf(
|
613 |
'<li class="rmp_theme_grid_item">
|
614 |
<div class="rmp-item-card">
|
@@ -628,7 +652,7 @@ class Theme_Manager {
|
|
628 |
</li>',
|
629 |
esc_url( $theme['preview_url']),
|
630 |
esc_attr( $theme['name'] ),
|
631 |
-
esc_url( $
|
632 |
$action_label,
|
633 |
$demo_link
|
634 |
);
|
@@ -719,7 +743,7 @@ class Theme_Manager {
|
|
719 |
*/
|
720 |
public function get_theme_thumbnail( $theme_name, $theme_type ) {
|
721 |
|
722 |
-
//If theme is
|
723 |
if ( $theme_type == 'template' ) {
|
724 |
return sprintf( '<img src="%s" class="theme-thumbnail">',
|
725 |
esc_url( RMP_PLUGIN_URL_V4 .'/assets/images/no-preview.jpeg' )
|
@@ -839,7 +863,7 @@ class Theme_Manager {
|
|
839 |
|
840 |
$html = '<ul class="rmp_theme_grids">';
|
841 |
|
842 |
-
if( ! $in_customizer ) {
|
843 |
$html .= sprintf(
|
844 |
'<li class="rmp_theme_grid_item">
|
845 |
<input type="radio" checked id="default" class="rmp-theme-option" name="menu_theme" value="" theme-type="default"/>
|
@@ -852,7 +876,7 @@ class Theme_Manager {
|
|
852 |
<h4> %2$s </h4>
|
853 |
</div>
|
854 |
<div class="rmp-item-card_action">
|
855 |
-
<a href="https://demo.responsive.menu/themes/default-theme
|
856 |
</div>
|
857 |
</div>
|
858 |
</label>
|
@@ -869,9 +893,21 @@ class Theme_Manager {
|
|
869 |
|
870 |
$demo_link = '';
|
871 |
if ( ! empty( $theme['demo_link' ] ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
872 |
$demo_link = sprintf(
|
873 |
'<a href="%s" alt="%s" target="_blank" class="button">%s</a>',
|
874 |
-
esc_url( $
|
875 |
esc_attr( $theme['theme_name'] ),
|
876 |
__( 'View Demo','responsive-menu-pro' )
|
877 |
);
|
@@ -954,20 +990,11 @@ class Theme_Manager {
|
|
954 |
);
|
955 |
}
|
956 |
|
957 |
-
//Check the request origin either from customizer or create menu page.
|
958 |
-
$is_customizer_request = false;
|
959 |
-
if ( ! empty( $_SERVER[ 'HTTP_REFERER' ] ) ) {
|
960 |
-
parse_str( parse_url( $_SERVER[ 'HTTP_REFERER' ] )['query'], $params );
|
961 |
-
if ( ! empty( $params['action'] ) && ! empty( $params['editor'] ) ) {
|
962 |
-
$is_customizer_request = true;
|
963 |
-
}
|
964 |
-
}
|
965 |
-
|
966 |
//Return the response
|
967 |
return wp_send_json_success(
|
968 |
[
|
969 |
'message' => __( 'Theme is uploaded successfully', 'responsive-menu-pro' ),
|
970 |
-
'html' => $this->get_available_themes( $
|
971 |
]
|
972 |
);
|
973 |
}
|
@@ -987,9 +1014,28 @@ class Theme_Manager {
|
|
987 |
return wp_send_json_success(
|
988 |
[
|
989 |
'message' => __( 'Cache data updated !', 'responsive-menu-pro' ),
|
990 |
-
'html' => $this->get_themes_from_theme_store()
|
991 |
]
|
992 |
);
|
993 |
}
|
994 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
995 |
}
|
571 |
return $html;
|
572 |
}
|
573 |
|
574 |
+
/**
|
575 |
* Design the theme list which are from stored.
|
576 |
*
|
577 |
* @since 4.0.0
|
578 |
* @return HTML|string $html
|
579 |
*/
|
580 |
+
public function get_themes_from_theme_store( $in_customizer = false ) {
|
581 |
|
582 |
$themes = $this->get_themes_by_api();
|
583 |
$uploaded_themes = $this->get_uploaded_theme_dir();
|
600 |
}
|
601 |
|
602 |
$demo_link = '';
|
603 |
+
if ( ! empty( $theme['demo_link'] ) ) {
|
604 |
+
if ( $in_customizer ) {
|
605 |
+
$link = add_query_arg( [
|
606 |
+
'utm_source' => 'plugin',
|
607 |
+
'utm_medium' => 'change_theme_wizard'
|
608 |
+
], $theme['demo_link'] );
|
609 |
+
} else {
|
610 |
+
$link = add_query_arg( [
|
611 |
+
'utm_source' => 'plugin',
|
612 |
+
'utm_medium' => 'new_menu_wizard'
|
613 |
+
], $theme['demo_link'] );
|
614 |
+
}
|
615 |
+
|
616 |
$demo_link = sprintf(
|
617 |
'<a href="%s" alt="%s" target="_blank" class="button">%s</a>',
|
618 |
+
esc_url( $link ),
|
619 |
esc_attr( $theme['name'] ),
|
620 |
__( 'View Demo','responsive-menu-pro' )
|
621 |
);
|
622 |
}
|
623 |
|
624 |
+
if ( $in_customizer ) {
|
625 |
+
$buy_link = add_query_arg( [
|
626 |
+
'utm_source' => 'plugin',
|
627 |
+
'utm_medium' => 'change_theme_wizard'
|
628 |
+
], $theme['buy_link'] );
|
629 |
+
} else {
|
630 |
+
$buy_link = add_query_arg( [
|
631 |
+
'utm_source' => 'plugin',
|
632 |
+
'utm_medium' => 'new_menu_wizard'
|
633 |
+
], $theme['buy_link'] );
|
634 |
+
}
|
635 |
+
|
636 |
$html .= sprintf(
|
637 |
'<li class="rmp_theme_grid_item">
|
638 |
<div class="rmp-item-card">
|
652 |
</li>',
|
653 |
esc_url( $theme['preview_url']),
|
654 |
esc_attr( $theme['name'] ),
|
655 |
+
esc_url( $buy_link ),
|
656 |
$action_label,
|
657 |
$demo_link
|
658 |
);
|
743 |
*/
|
744 |
public function get_theme_thumbnail( $theme_name, $theme_type ) {
|
745 |
|
746 |
+
//If theme is template
|
747 |
if ( $theme_type == 'template' ) {
|
748 |
return sprintf( '<img src="%s" class="theme-thumbnail">',
|
749 |
esc_url( RMP_PLUGIN_URL_V4 .'/assets/images/no-preview.jpeg' )
|
863 |
|
864 |
$html = '<ul class="rmp_theme_grids">';
|
865 |
|
866 |
+
if ( ! $in_customizer ) {
|
867 |
$html .= sprintf(
|
868 |
'<li class="rmp_theme_grid_item">
|
869 |
<input type="radio" checked id="default" class="rmp-theme-option" name="menu_theme" value="" theme-type="default"/>
|
876 |
<h4> %2$s </h4>
|
877 |
</div>
|
878 |
<div class="rmp-item-card_action">
|
879 |
+
<a href="https://demo.responsive.menu/themes/default-theme/?utm_source=plugin&utm_medium=new_menu_wizard" alt="%2$s" target="_blank" class="button">%3$s</a>
|
880 |
</div>
|
881 |
</div>
|
882 |
</label>
|
893 |
|
894 |
$demo_link = '';
|
895 |
if ( ! empty( $theme['demo_link' ] ) ) {
|
896 |
+
if ( $in_customizer ) {
|
897 |
+
$link = add_query_arg( [
|
898 |
+
'utm_source' => 'plugin',
|
899 |
+
'utm_medium' => 'change_theme_wizard'
|
900 |
+
], $theme['demo_link' ] );
|
901 |
+
} else {
|
902 |
+
$link = add_query_arg( [
|
903 |
+
'utm_source' => 'plugin',
|
904 |
+
'utm_medium' => 'new_menu_wizard'
|
905 |
+
], $theme['demo_link' ] );
|
906 |
+
}
|
907 |
+
|
908 |
$demo_link = sprintf(
|
909 |
'<a href="%s" alt="%s" target="_blank" class="button">%s</a>',
|
910 |
+
esc_url( $link ),
|
911 |
esc_attr( $theme['theme_name'] ),
|
912 |
__( 'View Demo','responsive-menu-pro' )
|
913 |
);
|
990 |
);
|
991 |
}
|
992 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
993 |
//Return the response
|
994 |
return wp_send_json_success(
|
995 |
[
|
996 |
'message' => __( 'Theme is uploaded successfully', 'responsive-menu-pro' ),
|
997 |
+
'html' => $this->get_available_themes( $this->is_customizer() )
|
998 |
]
|
999 |
);
|
1000 |
}
|
1014 |
return wp_send_json_success(
|
1015 |
[
|
1016 |
'message' => __( 'Cache data updated !', 'responsive-menu-pro' ),
|
1017 |
+
'html' => $this->get_themes_from_theme_store( $this->is_customizer() )
|
1018 |
]
|
1019 |
);
|
1020 |
}
|
1021 |
|
1022 |
+
/**
|
1023 |
+
* Function to check the request origin either from customizer or create menu page.
|
1024 |
+
*
|
1025 |
+
* @since 4.1.3
|
1026 |
+
*
|
1027 |
+
* @return bool
|
1028 |
+
*/
|
1029 |
+
public function is_customizer() {
|
1030 |
+
|
1031 |
+
$is_customizer_request = false;
|
1032 |
+
if ( ! empty( $_SERVER[ 'HTTP_REFERER' ] ) ) {
|
1033 |
+
parse_str( parse_url( $_SERVER[ 'HTTP_REFERER' ] )['query'], $params );
|
1034 |
+
if ( ! empty( $params['action'] ) && ! empty( $params['editor'] ) ) {
|
1035 |
+
$is_customizer_request = true;
|
1036 |
+
}
|
1037 |
+
}
|
1038 |
+
|
1039 |
+
return $is_customizer_request;
|
1040 |
+
}
|
1041 |
}
|
v4.0.0/templates/rmp-roadmap.php
CHANGED
@@ -16,10 +16,10 @@
|
|
16 |
</script>
|
17 |
<script type="text/javascript" src="https://app.productstash.io/js/productstash-embed.js" defer="defer"></script>
|
18 |
|
19 |
-
<!--
|
20 |
-
<h1 class="wp-heading-inline"> <?php esc_html_e( '
|
21 |
|
22 |
-
<!---
|
23 |
<div class="rmp-roadmap-page" >
|
24 |
<iframe id="rmp-roadmap-iframe" src="https://next.expresstech.io/responsive-menu"></iframe>
|
25 |
</div>
|
16 |
</script>
|
17 |
<script type="text/javascript" src="https://app.productstash.io/js/productstash-embed.js" defer="defer"></script>
|
18 |
|
19 |
+
<!-- What's Next page title -->
|
20 |
+
<h1 class="wp-heading-inline"> <?php esc_html_e( 'What\'s Next', 'responsive-menu-pro' ); ?> </h1>
|
21 |
|
22 |
+
<!--- What's Next page contents --->
|
23 |
<div class="rmp-roadmap-page" >
|
24 |
<iframe id="rmp-roadmap-iframe" src="https://next.expresstech.io/responsive-menu"></iframe>
|
25 |
</div>
|
v4.0.0/templates/rmp-wizards.php
CHANGED
@@ -199,7 +199,7 @@ if ( empty( $cached_data ) ) {
|
|
199 |
<ul class="rmp_theme_grids">
|
200 |
<?php
|
201 |
if ( ! empty( $cached_data ) ) {
|
202 |
-
echo $theme_manager->get_themes_from_theme_store();
|
203 |
} else {
|
204 |
?>
|
205 |
<div class="rmp-page-loader" style="display:flex;">
|
199 |
<ul class="rmp_theme_grids">
|
200 |
<?php
|
201 |
if ( ! empty( $cached_data ) ) {
|
202 |
+
echo $theme_manager->get_themes_from_theme_store( true );
|
203 |
} else {
|
204 |
?>
|
205 |
<div class="rmp-page-loader" style="display:flex;">
|