Skip to content

Instantly share code, notes, and snippets.

@tacensi
Created May 25, 2015 21:05
Show Gist options
  • Save tacensi/f1c03e760ceb1b02f2fb to your computer and use it in GitHub Desktop.
Save tacensi/f1c03e760ceb1b02f2fb to your computer and use it in GitHub Desktop.
Change CF7 select blank line
// Alterando o texto da blank line do Contact form 7
function my_wpcf7_form_elements($html) {
$text = 'Selecione o departamento';
$html = str_replace('<option value="">---</option>', '<option value="">' . $text . '</option>', $html);
return $html;
}
add_filter('wpcf7_form_elements', 'my_wpcf7_form_elements');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment