Last active
October 5, 2016 17:23
-
-
Save pablo-sg-pacheco/62c5c31ef484fddb7ff13de0d74c55d0 to your computer and use it in GitHub Desktop.
Add default contact details fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment