AP_Form_Hooks::image_upload_form()
Description #
Image upload form.
This form is used for uploading images in AnsPress.
Source #
File: includes/class-form-hooks.php
	public static function image_upload_form() {
		return array(
			'submit_label' => __( 'Upload & insert', 'anspress-question-answer' ),
			'fields'       => array(
				'image' => array(
					'label'          => __( 'Image', 'anspress-question-answer' ),
					'desc'           => __( 'Select image(s) to upload. Only .jpg, .png and .gif files allowed.', 'anspress-question-answer' ),
					'type'           => 'upload',
					'save'           => array( __CLASS__, 'image_upload_save' ),
					'upload_options' => array(
						'multiple'      => false,
						'max_files'     => 1,
						'allowed_mimes' => array(
							'jpg|jpeg' => 'image/jpeg',
							'gif'      => 'image/gif',
							'png'      => 'image/png',
						),
					),
					'validate'       => 'required',
				),
			),
		);
	}
Expand full source code Collapse full source code View on GitHub: includes/class-form-hooks.php:996
  Add your comment