| @@ -93,11 +93,9 @@ | ||
| 93 | 93 | * Only for Admin Add/Edit Pages |
| 94 | 94 | */ |
| 95 | 95 | public function enqueue( $hook ) { |
| 96 | 96 | $editor = 'core/edit-post'; |
| 97 | - // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only screen detection. | |
| 98 | - $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; | |
| 99 | - if ( $hook === 'site-editor.php' || ( $hook === 'themes.php' && $page === 'gutenberg-edit-site' ) ) { | |
| 97 | + if ( $hook == 'site-editor.php' || ( $hook == 'themes.php' && isset( $_GET['page'] ) && $_GET['page'] == 'gutenberg-edit-site' ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing | |
| 100 | 98 | $editor = 'core/edit-site'; |
| 101 | 99 | } |
| 102 | 100 | |
| 103 | 101 | $this->assets->register( 'betterdocs-blocks-editor-controls', 'blocks/controls.css' ); |