/** * Customize the default option selected on CF7 */</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">my_wpcf7_form_elements</span>(<span class="hljs-params">$html</span>) </span>{ $text = <span class="hljs-string">'—'</span>; $html = str_replace(<span class="hljs-string">'---'</span>, $text , $html); <span class="hljs-keyword">return</span> $html; } add_filter(<span class="hljs-string">'wpcf7_form_elements'</span>, <span class="hljs-string">'my_wpcf7_form_elements'</span>);
Source: