pablo-sg-pacheco
4/28/2016 - 9:54 PM

Add default contact details fields

Add default contact details fields

<?php

//Add default contact details fields
add_filter('contact_details', function( $details ) {
	unset($details['phone']);
	unset($details['fax']);
	unset($details['email']);
	unset($details['mobile']);
	unset($details['address']);

	$details['country']		 = array(
	  'label'	 => __('País'),
	  'input'	 => 'input'
	  ); 
	$details['state'] = array(
		'label'	 => __('Estado'),
		'input'	 => 'input'
	);
	$details['city'] = array(
		'label'	 => __('Cidade'),
		'input'	 => 'input'
	);
	$details['neighborhood'] = array(
	  'label'	 => __('Bairro'),
	  'input'	 => 'input'
	  ); 
	$details['address'] = array(
		'label'	 => __('Endereço'),
		'input'	 => 'input'
	);
	$details['cnpj'] = array(
		'label'	 => __('CNPJ'),
		'input'	 => 'input'
	);
	$details['office_hours'] = array(
		'label'	 => ('Horário de Atendimento'),
		'input'	 => 'input'
	);
	$details['phone1'] = array(
		'label'	 => __('Telefone 1'),
		'input'	 => 'input'
	);
	$details['phone2'] = array(
		'label'	 => __('Telefone 2'),
		'input'	 => 'input'
	);

	$details['email1'] = array(
		'label'	 => __('Email'),
		'input'	 => 'input'
	);
	
	$details['twitter'] = array(
		'label'	 => __('URL do Twitter'),
		'input'	 => 'input'
	);

	$details['facebook'] = array(
		'label'	 => __('URL do Facebook'),
		'input'	 => 'input'
	);

	$details['instagram'] = array(
		'label'	 => __('URL do Instagram'),
		'input'	 => 'input'
	);

	$details['youtube'] = array(
		'label'	 => __('URL do Youtube'),
		'input'	 => 'input'
	);

	return $details;
});