← All changes
|
WPDataProjects/Parent_Child/WPDP_Parent_List_View.php
+8
-10
5.5.36
→
5.5.85
View file →
| @@ -122,9 +122,9 @@ | ||
| 122 | 122 | */ |
| 123 | 123 | public function __construct( $args = array() ) { |
| 124 | 124 | if ( isset( $args['project_id'] ) ) { |
| 125 | 125 | $this->project_id = sanitize_text_field( wp_unslash( $args['project_id'] ) ); |
| 126 | - } elseif ( isset( $_REQUEST['tab'] ) && 'tables' === $_REQUEST['tab'] ) { | |
| 126 | + } elseif ( isset( $_REQUEST['tab'] ) && 'tables' === $_REQUEST['tab'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- verified in parent class | |
| 127 | 127 | $this->project_id = 'wpda_sys_tables'; |
| 128 | 128 | } |
| 129 | 129 | if ( isset( $args['page_id'] ) ) { |
| 130 | 130 | $this->page_id = sanitize_text_field( wp_unslash( $args['page_id'] ) ); |
| @@ -136,15 +136,14 @@ | ||
| 136 | 136 | $args['subtitle'] = $this->subtitle; |
| 137 | 137 | |
| 138 | 138 | parent::__construct( $args ); |
| 139 | 139 | |
| 140 | - $this->child_request = ( | |
| 141 | - isset( $_REQUEST['child_request'] ) && | |
| 142 | - 'TRUE' === sanitize_text_field( wp_unslash( $_REQUEST['child_request'] ) ) | |
| 140 | + $this->child_request = ( | |
| 141 | + isset( $_REQUEST['child_request'] ) && 'TRUE' === sanitize_text_field( wp_unslash( $_REQUEST['child_request'] ) ) // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- verified in parent class | |
| 143 | 142 | ); |
| 144 | 143 | |
| 145 | - if ( isset( $_REQUEST['mode'] ) ) { | |
| 146 | - $this->mode = sanitize_text_field( wp_unslash( $_REQUEST['mode'] ) ); // input var okay. | |
| 144 | + if ( isset( $_REQUEST['mode'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- verified in parent class | |
| 145 | + $this->mode = sanitize_text_field( wp_unslash( $_REQUEST['mode'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- verified in parent class | |
| 147 | 146 | } |
| 148 | 147 | |
| 149 | 148 | if ( isset( $args['parent_edit_form_class'] ) ) { |
| 150 | 149 | $this->parent_edit_form_class = $args['parent_edit_form_class']; // input var okay. |
| @@ -168,9 +167,9 @@ | ||
| 168 | 167 | wp_enqueue_script( 'datetimepicker' ); |
| 169 | 168 | |
| 170 | 169 | $this->project = new WPDP_Project( $this->project_id, $this->page_id ); |
| 171 | 170 | if ( null === $this->project->get_project() ) { |
| 172 | - wp_die( __( 'Data Project page not found [need a valid project_id and page_id]', 'wp-data-access' ) ); | |
| 171 | + wp_die( esc_attr__( 'Data Project page not found [need a valid project_id and page_id]', 'wp-data-access' ) ); | |
| 173 | 172 | } |
| 174 | 173 | if ( null === $this->title ) { |
| 175 | 174 | $this->title = $this->project->get_title(); |
| 176 | 175 | } |
| @@ -186,10 +185,9 @@ | ||
| 186 | 185 | |
| 187 | 186 | // DO NOT REMOVE!!! |
| 188 | 187 | // Yes, this is double code! But for some completely unclear reason this member seems to lose this value... |
| 189 | 188 | $this->child_request = ( |
| 190 | - isset( $_REQUEST['child_request'] ) && | |
| 191 | - 'TRUE' === sanitize_text_field( wp_unslash( $_REQUEST['child_request'] ) ) | |
| 189 | + isset( $_REQUEST['child_request'] ) && 'TRUE' === sanitize_text_field( wp_unslash( $_REQUEST['child_request'] ) ) // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- verified in parent class | |
| 192 | 190 | ); |
| 193 | 191 | |
| 194 | 192 | if ( $this->child_request ) { |
| 195 | 193 | $this->display_edit_form(); |
| @@ -253,9 +251,9 @@ | ||
| 253 | 251 | ); |
| 254 | 252 | |
| 255 | 253 | $form->prepare_form(); |
| 256 | 254 | |
| 257 | - if ( isset( $_POST['postaction'] ) && 'list' === $_POST['postaction'] ) { | |
| 255 | + if ( isset( $_POST['postaction'] ) && 'list' === $_POST['postaction'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing -- verified in parent class | |
| 258 | 256 | $this->display_list_table(); |
| 259 | 257 | } else { |
| 260 | 258 | $form->show(); |
| 261 | 259 | } |