Home / Admin / Add a document file upload
Duplicate Snippet

Embed Snippet on Your Site

Add a document file upload

Code Preview
php
<?php
// Add the document field to the signup form.
add_action( 'wcv_form_input_after__wcv_store_name', 'wcv_doc_uploader');
function wcv_doc_uploader( ){
	if ('signup' == WCVendors_Pro_Store_Form::$form_type ){
		echo '<hr />';
		echo '<h3>Document Uploader</h3>';
		$value = get_user_meta( get_current_user_id(), '_wcv_custom_settings_doc_example', true );
		WCVendors_Pro_Form_Helper::file_uploader( array(
			'id' 	            => '_wcv_custom_settings_doc_example',
			'header_text'		=> __('Document uploader', 'wcvendors-pro' ),
			'add_text' 			=> __('Add document', 'wcvendors-pro' ),
			'remove_text'		=> __('Remove document', 'wcvendors-pro' ),
			'file_meta_key' 	=> '_wcv_custom_settings_doc_example',
			'save_button'		=> __('Add document', 'wcvendors-pro' ),
			'window_title'		=> __('Select a document', 'wcvendors-pro' ),
			'value'				=> $value
			), 'document'
		);
	}
}

Comments

Add a Comment