Upload::save_uploads()
Description #
Save all uploads to server.
Source #
File: lib/form/class-upload.php
public function save_uploads() { if ( $this->have_errors() || true === $this->uploaded ) { return; } $value = $this->value(); // Return if value is empty. if ( empty( $value ) ) { return; } if ( $this->get( 'upload_options.multiple', false ) ) { foreach ( (array) $value as $file ) { $this->upload_file( $file ); } } else { $this->upload_file( $value ); } $this->value = $this->uploaded_files; $this->uploaded = true; }
Expand full source code Collapse full source code View on GitHub: lib/form/class-upload.php:329
Add your comment