php - Contact Fom 7 - how to add custom HTML inside span.wpcf7-form-control-wrap AND IMMEDIATELY AFTER input.wpcf7-form-control?

Contact Fom 7 - how to add custom HTML inside span.wpcf7-form-control-wrap AND IMMEDIATELY AFTER input.wpcf7-form-contro

Contact Fom 7 - how to add custom HTML inside span.wpcf7-form-control-wrap AND IMMEDIATELY AFTER input.wpcf7-form-control ? Using the 'Query Monitor' plugin I found that the HOOK which I need to modify is inside the:

'/wp-content/plugins/contact-form-7/modules/text.php' file, namely 'wpcf7_add_form_tag_text' hook

My attepmt is:

function test($html) {

$html = sprintf(
'<span class="wpcf7-form-control-wrap %1$s"><input %2$s />%3$s<span class="focus-input100-1"></span><span class="focus-input100-2"></span></span>',
sanitize_html_class( $tag->name ), $atts, $validation_error );
return $html;
}

add_filter('wpcf7_add_form_tag_text', 'test');

...but it does not work

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744663062a4586581.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信