Skip to content

Instantly share code, notes, and snippets.

@slavapas
Created January 22, 2022 18:38

Revisions

  1. slavapas revised this gist Jan 22, 2022. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions functons.php
    Original file line number Diff line number Diff line change
    @@ -1 +1,8 @@
    // Contact Form 7 : How to enable shortcodes in Form and Mail Template
    function my_special_mail_tag( $output, $name, $html ) {
    if ( 'myshortcode' == $name )
    $output = do_shortcode( "[$name]" );

    return $output;
    }
    add_filter( 'wpcf7_special_mail_tags', 'my_special_mail_tag', 10, 3 );
  2. slavapas revised this gist Jan 22, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion functons.php
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    ‎‎​
    // Contact Form 7 : How to enable shortcodes in Form and Mail Template
  3. slavapas created this gist Jan 22, 2022.
    1 change: 1 addition & 0 deletions functons.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    ‎‎​