Home / Admin / Add an audio field to the sign up form
Duplicate Snippet

Embed Snippet on Your Site

Add an audio field to the sign up form

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

Comments

Add a Comment