Plugin Directory

Changeset 2843134


Ignore:
Timestamp:
01/04/2023 01:30:58 AM (3 years ago)
Author:
teamgate
Message:

feat: add priority support for wpcf7_add_form_tag and fallback to wpcf7_add_shortcode if exist on older CF7 versions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • teamgate-crm-forms/trunk/teamgate.php

    r2843133 r2843134  
    7575
    7676function contact_form_7_teamgate_submit() {
    77     if (function_exists('wpcf7_add_shortcode')) {
    78         wpcf7_add_shortcode('teamgatesubmit', 'wpcf7_teamgate_submit_shortcode_handler', false);
     77    if (function_exists('wpcf7_add_form_tag')) {
     78        wpcf7_add_form_tag('teamgatesubmit', 'wpcf7_teamgate_submit_shortcode_handler', false);
     79    } elseif (function_exists('wpcf7_add_shortcode')) {
     80        wpcf7_add_shortcode('teamgatesubmit', 'wpcf7_teamgate_submit_shortcode_handler', false);
    7981    } else {
    8082        return;
Note: See TracChangeset for help on using the changeset viewer.