Home / Admin / Add an image filed to the sign up form
Duplicate Snippet

Embed Snippet on Your Site

Add an image filed to the sign up form

Code Preview
php
<?php
// Add the image field to the signup form.
add_action( 'wcv_form_input_after__wcv_store_name', 'wcv_image_uploader');
function wcv_image_uploader( ){
	if ('signup' == WCVendors_Pro_Store_Form::$form_type ){
		echo '<h3>Image Uploader</h3>';
		$value = get_user_meta( get_current_user_id(), '_wcv_custom_settings_image_example', true );
		WCVendors_Pro_Form_Helper::file_uploader( array(
			'id' 	            => '_wcv_custom_settings_image_example',
			'header_text'		=> __('Image uploader', 'wcvendors-pro' ),
			'add_text' 			=> __('Add image file', 'wcvendors-pro' ),
			'remove_text'		=> __('Remove image file', 'wcvendors-pro' ),
			'image_meta_key' 	=> '_wcv_custom_settings_image_example',
			'save_button'		=> __('Add image file', 'wcvendors-pro' ),
			'window_title'		=> __('Select an Image', 'wcvendors-pro' ),
			'value'				=> $value
			), 'image'
		);
	}
}

Comments

Add a Comment