Repeatable::unsafe_value()
Description #
Get POST (unsafe) value of a field.
Source #
File: lib/form/class-repeatable.php
public function unsafe_value() { $request_value = $this->get( ap_to_dot_notation( $this->field_name ), null, $_REQUEST ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( $request_value ) { $value = array_filter( wp_unslash( $request_value ) ); foreach ( $value as $k => $val ) { $val = is_array( $val ) ? $val : array(); if ( empty( array_filter( $val ) ) ) { unset( $value[ $k ] ); } } return $value; } }
Expand full source code Collapse full source code View on GitHub: lib/form/class-repeatable.php:98
Add your comment