Upload::js_args()
Description #
Return arguments for used by JS.
Source #
File: lib/form/class-upload.php
public function js_args() { $args = $this->get( 'upload_options' ); $allowed_ext = '.' . str_replace( '|', ',.', implode( ',.', array_keys( $args['allowed_mimes'] ) ) ); unset( $args['allowed_mimes'] ); $args['field_name'] = $this->original_name; $args['form_name'] = $this->form_name; return wp_json_encode( $args ); }
Expand full source code Collapse full source code View on GitHub: lib/form/class-upload.php:224
Add your comment