| @@ -4,8 +4,9 @@ | ||
| 4 | 4 | * Suppress "error - 0 - No summary was found for this file" on phpdoc generation |
| 5 | 5 | * |
| 6 | 6 | * @package WPDataAccess\Settings |
| 7 | 7 | */ |
| 8 | +// phpcs:disable WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing -- verified on page | |
| 8 | 9 | namespace WPDataAccess\Settings; |
| 9 | 10 | |
| 10 | 11 | /** |
| 11 | 12 | * Class WPDA_Settings |
| @@ -63,12 +64,11 @@ | ||
| 63 | 64 | public function __construct( $current_tab ) { |
| 64 | 65 | // Get menu slug of current page. |
| 65 | 66 | if ( isset( $_REQUEST['page'] ) ) { |
| 66 | 67 | $this->page = sanitize_text_field( wp_unslash( $_REQUEST['page'] ) ); |
| 67 | - // input var okay. | |
| 68 | 68 | } else { |
| 69 | 69 | // In order to show a list table we need a page. |
| 70 | - wp_die( __( 'ERROR: Wrong arguments [missing page argument]', 'wp-data-access' ) ); | |
| 70 | + wp_die( esc_attr__( 'ERROR: Wrong arguments [missing page argument]', 'wp-data-access' ) ); | |
| 71 | 71 | } |
| 72 | 72 | $this->current_tab = $current_tab; |
| 73 | 73 | // Tabs array is filled in constructor to add i18n. |
| 74 | 74 | $this->tabs = array( |
| @@ -102,9 +102,9 @@ | ||
| 102 | 102 | ?> |
| 103 | 103 | <div class="wrap"> |
| 104 | 104 | <h1> |
| 105 | 105 | <?php |
| 106 | - echo __( 'WP Data Access Settings', 'wp-data-access' ); | |
| 106 | + esc_html_e( 'WP Data Access Settings', 'wp-data-access' ); | |
| 107 | 107 | ?> |
| 108 | 108 | </h1> |
| 109 | 109 | <?php |
| 110 | 110 | $this->add_tabs(); |
| @@ -137,4 +137,6 @@ | ||
| 137 | 137 | <?php |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | } |
| 141 | + | |
| 142 | +// phpcs:disable WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing | |