我有一个(test)函数,它添加了一个重定向bouton
function bouton($atts, $content = null) {
extract(shortcode_atts(array(
\'lien\' => \'#\',
\'couleur\' =>\'bleu\'
), $atts));
return \'<a class="bouton \'.$couleur.\'" href="\'.$lien.\'" target="_blank">\' . do_shortcode($content) . \'</a>\';
}
下面这行允许使用短代码
[bouton couleur="orange" lien="http://codex.wordpress.org/Shortcode_API"]L\'API Shortcode WordPress[/bouton]
联系form7编辑器:
function shortcodes_in_cf7( $form ) {
$form = do_shortcode( $form );
//place my short code below to work within contact form 7
add_shortcode(\'bouton\', \'bouton\');
return $form;
}
//line below to place ds form :
add_filter( \'wpcf7_form_elements\', \'shortcodes_in_cf7\' );
我已将此过滤器替换为
//add_filter( \' wpcf7_mail_components\', \'shortcodes_in_cf7\' );
//add_filter( \' wpcf7_mail_tag_replaced\', \'shortcodes_in_cf7\' );
//add_filter( \' wpcf7_display_message\', \'shortcodes_in_cf7\' );
尝试在电子邮件中使用它,但没有成功。
要使用什么过滤器?