Home / Admin / Add a video field to the sign-up form
Duplicate Snippet

Embed Snippet on Your Site

Add a video field to the sign-up form

Code Preview
php
<?php
// Add the video field to the signup form.
add_action( 'wcv_form_input_after__wcv_store_name', 'wcv_video_uploader');
function wcv_video_uploader( ){
	// Remove this check to have it show on sign up and settings pages.
	if ('signup' == WCVendors_Pro_Store_Form::$form_type ){
		echo '<h3>Video Uploader</h3>';
		$value = get_user_meta( get_current_user_id(), '_wcv_custom_settings_video_example', true );
		WCVendors_Pro_Form_Helper::file_uploader( array(
			'id' 	            => '_wcv_custom_settings_video_example',
			'header_text'		=> __('Video uploader', 'wcvendors-pro' ),
			'add_text' 			=> __('Add video', 'wcvendors-pro' ),
			'remove_text'		=> __('Remove video', 'wcvendors-pro' ),
			'file_meta_key' 	=> '_wcv_custom_settings_video_example',
			'save_button'		=> __('Add video', 'wcvendors-pro' ),
			'window_title'		=> __('Select video', 'wcvendors-pro' ),
			'value'				=> $value
			), 'video'
		);
	}
}

Comments

Add a Comment