AP_Form_Hooks::image_upload_save( array $values, AnsPressFieldUpload $field )
Description #
Callback for image field in image_upload
form.
Parameters #
- $valuesarray (Required) Values.
- $fieldAnsPressFieldUpload (Required) AnsPress field object.
Source #
File: includes/class-form-hooks.php
public static function image_upload_save( $values, $field ) { $field->save_uploads(); // Set files in session, so that it can be validated while saving post. if ( ! empty( $field->uploaded_files ) ) { foreach ( $field->uploaded_files as $new ) { anspress()->session->set_file( $new ); } } return $field->get_uploaded_files_url(); }
Expand full source code Collapse full source code View on GitHub: includes/class-form-hooks.php:975
Add your comment