PluginProbe
Elementor Website Builder – more than just a page builder / 3.2.0
Elementor Website Builder – more than just a page builder v3.2.0
4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
← All changes | modules/safe-mode/mu-plugin/elementor-safe-mode.php +5 -7 4.1.53.2.0 View file →
@@ -1,5 +1,6 @@
1 1 <?php
2 +
2 3 /**
3 4 * Plugin Name: Elementor Safe Mode
4 5 * Description: Safe Mode allows you to troubleshoot issues by only loading the editor, without loading the theme or any other plugin.
5 6 * Plugin URI: https://elementor.com/?utm_source=safe-mode&utm_campaign=plugin-uri&utm_medium=wp-dash
@@ -23,9 +24,9 @@
23 24 * GNU General Public License for more details.
24 25 */
25 26
26 27 if ( ! defined( 'ABSPATH' ) ) {
27 - exit; // Exit if accessed directly.
28 + exit; // Exit if accessed directly
28 29 }
29 30
30 31 class Safe_Mode {
31 32
@@ -36,11 +37,9 @@
36 37 return get_option( self::OPTION_ENABLED );
37 38 }
38 39
39 40 public function is_valid_token() {
40 - $token = isset( $_COOKIE[ self::OPTION_TOKEN ] )
41 - ? wp_kses_post( wp_unslash( $_COOKIE[ self::OPTION_TOKEN ] ) )
42 - : null;
41 + $token = isset( $_COOKIE[ self::OPTION_TOKEN ] ) ? $_COOKIE[ self::OPTION_TOKEN ] : null;
43 42
44 43 if ( $token && get_option( self::OPTION_TOKEN ) === $token ) {
45 44 return true;
46 45 }
@@ -60,10 +59,9 @@
60 59 return isset( $_GET['elementor-preview'] );
61 60 }
62 61
63 62 public function is_editor_ajax() {
64 - // PHPCS - There is already nonce verification in the Ajax Manager
65 - return is_admin() && isset( $_POST['action'] ) && 'elementor_ajax' === $_POST['action']; // phpcs:ignore WordPress.Security.NonceVerification.Missing
63 + return is_admin() && isset( $_POST['action'] ) && 'elementor_ajax' === $_POST['action'];
66 64 }
67 65
68 66 public function add_hooks() {
69 67 add_filter( 'pre_option_active_plugins', function () {
@@ -101,9 +99,9 @@
101 99 */
102 100 public function plugin_row_meta( $plugin_meta, $plugin_file, $plugin_data, $status ) {
103 101 if ( basename( __FILE__ ) === $plugin_file ) {
104 102 $row_meta = [
105 - 'docs' => '<a href="https://go.elementor.com/safe-mode/" target="_blank">' . esc_html__( 'Learn More', 'elementor' ) . '</a>',
103 + 'docs' => '<a href="https://go.elementor.com/safe-mode/" aria-label="' . esc_attr( __( 'Learn More', 'elementor' ) ) . '" target="_blank">' . __( 'Learn More', 'elementor' ) . '</a>',
106 104 ];
107 105
108 106 $plugin_meta = array_merge( $plugin_meta, $row_meta );
109 107 }