@@ -511,7 +511,7 @@ public function save_post( $post_id, $post, $update ) {
511511 // Standard field save.
512512 $ field_name = $ field ->name ;
513513 $ meta_key = self ::META_PREFIX . $ field_name ;
514- // phpcs:ignore WordPress.Security.NonceVerification.Missing
514+ // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized via $this->sanitize_value() below.
515515 $ raw_value = isset ( $ _POST [ $ meta_key ] ) ? wp_unslash ( $ _POST [ $ meta_key ] ) : '' ;
516516
517517
@@ -585,7 +585,7 @@ private function save_repeater_field( $post_id, $field, $sub_fields_map, $base_n
585585 if ( $ sub_field ->type === 'repeater ' ) {
586586 $ this ->save_repeater_field ( $ post_id , $ sub_field , $ sub_fields_map , $ full_name );
587587 } else {
588- // phpcs:ignore WordPress.Security.NonceVerification.Missing
588+ // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized via $this->sanitize_value() below.
589589 $ raw_value = isset ( $ _POST [ $ full_name ] ) ? wp_unslash ( $ _POST [ $ full_name ] ) : '' ;
590590 $ sanitized = $ this ->sanitize_value ( $ raw_value , $ sub_field ->type );
591591 update_post_meta ( $ post_id , $ full_name , $ sanitized );
@@ -637,7 +637,7 @@ private function save_group_field( $post_id, $field, $sub_fields_map, $base_name
637637 $ this ->save_group_field ( $ post_id , $ sub_field , $ sub_fields_map , $ full_name );
638638 } else {
639639 // Standard sub-field save.
640- // phpcs:ignore WordPress.Security.NonceVerification.Missing
640+ // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Sanitized via $this->sanitize_value() below.
641641 $ raw_value = isset ( $ _POST [ $ full_name ] ) ? wp_unslash ( $ _POST [ $ full_name ] ) : '' ;
642642 $ sanitized = $ this ->sanitize_value ( $ raw_value , $ sub_field ->type );
643643 update_post_meta ( $ post_id , $ full_name , $ sanitized );
@@ -1077,7 +1077,7 @@ public function save_taxonomy_fields( $term_id, $tt_id ) {
10771077
10781078 // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified above.
10791079 if ( isset ( $ _POST [ $ meta_key ] ) ) {
1080- // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified above.
1080+ // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Nonce verified above; sanitized via $this->sanitize_value() .
10811081 $ value = $ this ->sanitize_value ( wp_unslash ( $ _POST [ $ meta_key ] ), $ field ->type );
10821082 update_term_meta ( $ term_id , $ meta_key , $ value );
10831083 } else {
@@ -1131,7 +1131,7 @@ private function save_repeater_field_for_term( $term_id, $field, $sub_fields_map
11311131 if ( $ sub_field ->type === 'repeater ' ) {
11321132 $ this ->save_repeater_field_for_term ( $ term_id , $ sub_field , $ sub_fields_map , $ full_name );
11331133 } else {
1134- // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in save_taxonomy_fields.
1134+ // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Nonce verified in save_taxonomy_fields; sanitized via $this->sanitize_value() .
11351135 $ raw_value = isset ( $ _POST [ $ full_name ] ) ? wp_unslash ( $ _POST [ $ full_name ] ) : '' ;
11361136 $ sanitized = $ this ->sanitize_value ( $ raw_value , $ sub_field ->type );
11371137 update_term_meta ( $ term_id , $ full_name , $ sanitized );
@@ -1165,7 +1165,7 @@ private function save_group_field_for_term( $term_id, $field, $sub_fields_map, $
11651165 } elseif ( $ sub_field ->type === 'group ' ) {
11661166 $ this ->save_group_field_for_term ( $ term_id , $ sub_field , $ sub_fields_map , $ full_name );
11671167 } else {
1168- // phpcs:ignore WordPress.Security.NonceVerification.Missing
1168+ // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Nonce verified in save_taxonomy_fields; sanitized via $this->sanitize_value().
11691169 $ raw_value = isset ( $ _POST [ $ full_name ] ) ? wp_unslash ( $ _POST [ $ full_name ] ) : '' ;
11701170 $ sanitized = $ this ->sanitize_value ( $ raw_value , $ sub_field ->type );
11711171 update_term_meta ( $ term_id , $ full_name , $ sanitized );
@@ -1433,7 +1433,7 @@ public function save_user_fields( $user_id ) {
14331433
14341434 // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified above.
14351435 if ( isset ( $ _POST [ $ meta_key ] ) ) {
1436- // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified above.
1436+ // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Nonce verified above; sanitized via $this->sanitize_value() .
14371437 $ value = $ this ->sanitize_value ( wp_unslash ( $ _POST [ $ meta_key ] ), $ field ->type );
14381438 update_user_meta ( $ user_id , $ meta_key , $ value );
14391439 } else {
@@ -1487,7 +1487,7 @@ private function save_repeater_field_for_user( $user_id, $field, $sub_fields_map
14871487 if ( $ sub_field ->type === 'repeater ' ) {
14881488 $ this ->save_repeater_field_for_user ( $ user_id , $ sub_field , $ sub_fields_map , $ full_name );
14891489 } else {
1490- // phpcs:ignore WordPress.Security.NonceVerification.Missing -- Nonce verified in save_user_fields.
1490+ // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Nonce verified in save_user_fields; sanitized via $this->sanitize_value() .
14911491 $ raw_value = isset ( $ _POST [ $ full_name ] ) ? wp_unslash ( $ _POST [ $ full_name ] ) : '' ;
14921492 $ sanitized = $ this ->sanitize_value ( $ raw_value , $ sub_field ->type );
14931493 update_user_meta ( $ user_id , $ full_name , $ sanitized );
@@ -1521,7 +1521,7 @@ private function save_group_field_for_user( $user_id, $field, $sub_fields_map, $
15211521 } elseif ( $ sub_field ->type === 'group ' ) {
15221522 $ this ->save_group_field_for_user ( $ user_id , $ sub_field , $ sub_fields_map , $ full_name );
15231523 } else {
1524- // phpcs:ignore WordPress.Security.NonceVerification.Missing
1524+ // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Nonce verified in save_user_fields; sanitized via $this->sanitize_value().
15251525 $ raw_value = isset ( $ _POST [ $ full_name ] ) ? wp_unslash ( $ _POST [ $ full_name ] ) : '' ;
15261526 $ sanitized = $ this ->sanitize_value ( $ raw_value , $ sub_field ->type );
15271527 update_user_meta ( $ user_id , $ full_name , $ sanitized );
0 commit comments