VOOZH about

URL: https://broadcast.plainviewplugins.com/addon/contact-form-7/

⇱ Contact Form 7 | Broadcast


To contents
👁 Contact Form 7 banner

Contact Form 7 banner

This add-on adds support for Takayuki Miyoshi’s Contact Form 7 plugin.

The add-on allows for automatic broadcasting of forms when the shortcode is found in a post.

The add-on automatically detects the [contact-form-7 id="123"] shortcode and broadcasts the associated form to each child blog.

Comments

  1. If I understood correctly, after we added to the technical (hidden) cpt post with all the shortcodes, we need to update it immediately after the contact form 7 update.

    You can use the following code (replacing your post type and post title)

    add_action(‘wpcf7_after_save’, ‘update_tech_post’, 10, 1);
    function update_tech_post($args)
    {
       if (get_current_blog_id() != 1) {
          return;
       }

       global$wpdb;
       $tech_post_id = $wpdb->get_var(“SELECT ID FROM wp_posts WHERE post_title = ‘Broadcast Contact Forms’ AND post_type = ‘tech'”);

       ThreeWP_Broadcast()->api()->update_children($tech_post_id);
    }

    1. Looks good to me. I hope someone else finds a use for the code also!

Leave a Reply Cancel reply