| @@ -32,14 +32,8 @@ | ||
| 32 | 32 | */ |
| 33 | 33 | protected $holds_email_values = true; |
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | - * @var bool | |
| 37 | - */ | |
| 38 | - protected $array_allowed = false; | |
| 39 | - | |
| 40 | - | |
| 41 | - /** | |
| 42 | 36 | * @return string |
| 43 | 37 | */ |
| 44 | 38 | protected function include_form_builder_file() { |
| 45 | 39 | return FrmAppHelper::plugin_path() . '/classes/views/frm-fields/back-end/field-user-id.php'; |
| @@ -57,9 +51,9 @@ | ||
| 57 | 51 | */ |
| 58 | 52 | protected function get_field_value( $args ) { |
| 59 | 53 | $user_ID = get_current_user_id(); |
| 60 | 54 | $user_ID = ( $user_ID ? $user_ID : '' ); |
| 61 | - $posted_value = ( FrmAppHelper::is_admin() && $_POST && isset( $_POST['item_meta'][ $this->field['id'] ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing | |
| 55 | + $posted_value = ( FrmAppHelper::is_admin() && $_POST && isset( $_POST['item_meta'][ $this->field['id'] ] ) ); // WPCS: CSRF ok. | |
| 62 | 56 | $action = ( isset( $args['action'] ) ? $args['action'] : ( isset( $args['form_action'] ) ? $args['form_action'] : '' ) ); |
| 63 | 57 | $updating = $action == 'update'; |
| 64 | 58 | return ( is_numeric( $this->field['value'] ) || $posted_value || $updating ) ? $this->field['value'] : $user_ID; |
| 65 | 59 | } |
| @@ -129,10 +123,8 @@ | ||
| 129 | 123 | } |
| 130 | 124 | |
| 131 | 125 | /** |
| 132 | 126 | * @since 4.0.04 |
| 133 | - * | |
| 134 | - * @return void | |
| 135 | 127 | */ |
| 136 | 128 | public function sanitize_value( &$value ) { |
| 137 | 129 | FrmAppHelper::sanitize_value( 'intval', $value ); |
| 138 | 130 | } |