PluginProbe
Responsive Menu – Create Mobile-Friendly Menu / 3.1.22
Responsive Menu – Create Mobile-Friendly Menu v3.1.22
4.7.3 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.10 4.1.11 4.1.12 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2.0 All 90 releases
← All changes | config/routing.php +6 -37 4.1.23.1.22 View file →
@@ -31,37 +31,28 @@
31 31 $valid_nonce = wp_verify_nonce($_POST['responsive-menu-nonce'], 'update');
32 32 echo $controller->update($valid_nonce, wp_unslash($_POST['menu']));
33 33
34 34 elseif(isset($_POST['responsive-menu-reset'])):
35 - $valid_nonce = wp_verify_nonce( $_POST['responsive-menu-nonce'], 'update' );
35 + echo $controller->reset(get_responsive_menu_default_options());
36 36
37 - echo $controller->reset(get_responsive_menu_default_options(), $valid_nonce );
38 -
39 37 elseif(isset($_POST['responsive-menu-theme'])):
40 - $valid_nonce = wp_verify_nonce( $_POST['responsive-menu-nonce'], 'update' );
38 + echo $controller->apply_theme($_POST['menu']['menu_theme']);
41 39
42 - echo $controller->apply_theme($_POST['menu']['menu_theme'], $valid_nonce );
43 -
44 40 elseif(isset($_POST['responsive-menu-import'])):
45 - $valid_nonce = wp_verify_nonce( $_POST['responsive-menu-nonce'], 'update' );
46 -
47 41 $file = $_FILES['responsive-menu-import-file'];
48 42 $file_options = isset($file['tmp_name']) ? (array) json_decode(file_get_contents($file['tmp_name'])) : null;
49 - echo $controller->import( $file_options, $valid_nonce );
43 + echo $controller->import($file_options);
50 44
45 +
51 46 elseif(isset($_POST['responsive-menu-import-theme'])):
52 - $valid_nonce = wp_verify_nonce( $_POST['responsive-menu-nonce'], 'update' );
53 -
54 47 $file = $_FILES['responsive-menu-import-theme-file'];
55 48 $theme = isset($file['tmp_name']) && $file['tmp_name'] ? $file['tmp_name'] : null;
56 49
57 - echo $controller->import_theme( $theme, $valid_nonce );
50 + echo $controller->import_theme($theme);
58 51
59 52 elseif(isset($_POST['responsive-menu-rebuild-db'])):
60 - $valid_nonce = wp_verify_nonce( $_POST['responsive-menu-nonce'], 'update' );
53 + echo $controller->rebuild();
61 54
62 - echo $controller->rebuild( $valid_nonce );
63 -
64 55 else:
65 56 echo $controller->index();
66 57
67 58 endif;
@@ -67,30 +58,8 @@
67 58 endif;
68 59 },
69 60 'dashicons-menu');
70 61 });
71 -
72 - /** Function to move to the new version */
73 - add_action('wp_ajax_rmp_switch_version', function() {
74 -
75 - if ( empty ( update_option( 'is_rmp_new_version', 1 ) ) ) {
76 - add_option( 'is_rmp_new_version', 1 );
77 - }
78 -
79 - update_option( 'rm_upgrade_admin_notice', true );
80 - wp_send_json_success( ['redirect' => admin_url('edit.php?post_type=rmp_menu')] );
81 -
82 - });
83 -
84 - add_action( "wp_ajax_rmp_version_admin_notice_dismiss", "rmp_version_admin_notice_dismiss");
85 - /**
86 - * Function to hide the version upgrade admin notice permanent.
87 - */
88 - function rmp_version_admin_notice_dismiss() {
89 - update_option( 'rm_upgrade_admin_notice', true );
90 - }
91 -
92 -
93 62 else:
94 63 add_action('template_redirect', function() {
95 64 $controller = get_responsive_menu_service('front_controller');
96 65 if(isset($_GET['responsive-menu-preview']) && isset($_POST['menu']))