← All changes
|
modules/safe-mode/mu-plugin/elementor-safe-mode.php
+4
-5
4.1.0-beta2
→
3.5.6
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 | } |
| @@ -101,9 +100,9 @@ | ||
| 101 | 100 | */ |
| 102 | 101 | public function plugin_row_meta( $plugin_meta, $plugin_file, $plugin_data, $status ) { |
| 103 | 102 | if ( basename( __FILE__ ) === $plugin_file ) { |
| 104 | 103 | $row_meta = [ |
| 105 | - 'docs' => '<a href="https://go.elementor.com/safe-mode/" target="_blank">' . esc_html__( 'Learn More', 'elementor' ) . '</a>', | |
| 104 | + 'docs' => '<a href="https://go.elementor.com/safe-mode/" aria-label="' . esc_attr( esc_html__( 'Learn More', 'elementor' ) ) . '" target="_blank">' . esc_html__( 'Learn More', 'elementor' ) . '</a>', | |
| 106 | 105 | ]; |
| 107 | 106 | |
| 108 | 107 | $plugin_meta = array_merge( $plugin_meta, $row_meta ); |
| 109 | 108 | } |