| @@ -70,18 +70,19 @@ | ||
| 70 | 70 | * @return boolean |
| 71 | 71 | */ |
| 72 | 72 | public function elementor_builder_is_active() { |
| 73 | 73 | // Check if this is the admin theme builder app. |
| 74 | - // phpcs:disable WordPress.Security.NonceVerification.Recommended -- Read-only routing check. | |
| 74 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended Simple & direct string comparison. | |
| 75 | 75 | if ( |
| 76 | 76 | is_admin() && |
| 77 | + // Disable notices as this is a generic string comparison to prevent doing a lot of work. | |
| 78 | + // phpcs:disable WordPress.Security.NonceVerification.Recommended | |
| 77 | 79 | ! empty( $_GET['page'] ) && |
| 78 | - is_string( $_GET['page'] ) && | |
| 79 | - 'elementor-app' === sanitize_key( wp_unslash( $_GET['page'] ) ) | |
| 80 | + 'elementor-app' === $_GET['page'] | |
| 81 | + // phpcs:enable WordPress.Security.NonceVerification.Recommended | |
| 80 | 82 | ) { |
| 81 | 83 | return true; |
| 82 | 84 | } |
| 83 | - // phpcs:enable WordPress.Security.NonceVerification.Recommended | |
| 84 | 85 | |
| 85 | 86 | if ( ! class_exists( '\Elementor\Plugin' ) || ! isset( \Elementor\Plugin::$instance ) ) { |
| 86 | 87 | return false; |
| 87 | 88 | } |