| @@ -1,7 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -// phpcs:ignore Standard.Category.SniffName.ErrorCode | |
| 3 | +// phpcs:disable WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing -- verified on page | |
| 4 | 4 | namespace WPDataAccess\Dashboard; |
| 5 | 5 | |
| 6 | 6 | use WPDataAccess\WPDA; |
| 7 | 7 | /** |
| @@ -71,17 +71,12 @@ | ||
| 71 | 71 | * @return void |
| 72 | 72 | */ |
| 73 | 73 | public static function widget() { |
| 74 | 74 | $panel_name = ( isset( $_REQUEST['wpda_panel_name'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wpda_panel_name'] ) ) : '' ); |
| 75 | - // phpcs:ignore WordPress.Security.NonceVerification | |
| 76 | 75 | $panel_code_id = ( isset( $_REQUEST['wpda_panel_code_id'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wpda_panel_code_id'] ) ) : '' ); |
| 77 | - // phpcs:ignore WordPress.Security.NonceVerification | |
| 78 | 76 | $panel_column = ( isset( $_REQUEST['wpda_panel_column'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wpda_panel_column'] ) ) : '1' ); |
| 79 | - // phpcs:ignore WordPress.Security.NonceVerification | |
| 80 | 77 | $column_position = ( isset( $_REQUEST['wpda_column_position'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wpda_column_position'] ) ) : 'prepend' ); |
| 81 | - // phpcs:ignore WordPress.Security.NonceVerification | |
| 82 | 78 | $widget_sequence_nr = ( isset( $_REQUEST['wpda_widget_sequence_nr'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['wpda_widget_sequence_nr'] ) ) : '1' ); |
| 83 | - // phpcs:ignore WordPress.Security.NonceVerification | |
| 84 | 79 | $wdg = new WPDA_Widget_Code(array( |
| 85 | 80 | 'name' => $panel_name, |
| 86 | 81 | 'code_id' => $panel_code_id, |
| 87 | 82 | 'column' => $panel_column, |
| @@ -88,10 +83,11 @@ | ||
| 88 | 83 | 'position' => $column_position, |
| 89 | 84 | 'widget_id' => $widget_sequence_nr, |
| 90 | 85 | )); |
| 91 | 86 | WPDA::sent_header( 'text/html; charset=UTF-8' ); |
| 87 | + // phpcs:disable WordPress.Security.EscapeOutput | |
| 92 | 88 | echo $wdg->container(); |
| 93 | - // phpcs:ignore WordPress.Security.EscapeOutput | |
| 89 | + // phpcs:enable WordPress.Security.EscapeOutput | |
| 94 | 90 | wp_die(); |
| 95 | 91 | } |
| 96 | 92 | |
| 97 | 93 | /** |
| @@ -99,10 +95,13 @@ | ||
| 99 | 95 | * |
| 100 | 96 | * @return void |
| 101 | 97 | */ |
| 102 | 98 | public static function refresh() { |
| 99 | + // phpcs:disable WordPress.Security.EscapeOutput | |
| 103 | 100 | echo static::msg( 'ERROR', 'Method not available for this panel type' ); |
| 104 | - // phpcs:ignore WordPress.Security.EscapeOutput | |
| 101 | + // phpcs:enable WordPress.Security.EscapeOutput | |
| 105 | 102 | wp_die(); |
| 106 | 103 | } |
| 107 | 104 | |
| 108 | 105 | } |
| 106 | + | |
| 107 | +// phpcs:enable WordPress.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Missing | |