= $max_uploads; $params = array( 'runtimes' => 'html5,silverlight,flash,html4', 'file_data_name' => 'async-upload', 'container' => $field['key'] . '-dragdrop', 'browse_button' => $field['key'] . '-browse-button', 'drop_element' => $field['key'] . '-dragdrop-dropzone', 'multiple_queues' => true, 'url' => admin_url( 'admin-ajax.php' ), 'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ), 'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ), 'multipart' => true, 'urlstream_upload' => true, 'filters' => array( array( 'title' => _x( 'Allowed Image Files', 'image upload', 'charitable' ), 'extensions' => 'jpg,jpeg,gif,png', ), ), 'multipart_params' => array( 'field_id' => $field['key'], 'action' => 'charitable_plupload_image_upload', '_ajax_nonce' => wp_create_nonce( "charitable-upload-images-{$field[ 'key' ]}" ), 'post_id' => isset( $field['parent_id'] ) && strlen( $field['parent_id'] ) ? $field['parent_id'] : '0', 'size' => $size, 'max_uploads' => $max_uploads, ), ); wp_enqueue_script( 'charitable-plup-fields' ); wp_enqueue_style( 'charitable-plup-styles' ); ?>