Plugin Directory

Changeset 3037812

Timestamp:
02/19/2024 10:25:59 AM (6 months ago)
Author:
itpathsolutions
Message:

1.1.9

  • Fix - Basic fixes and updates
  • New - More API's support added
Location:
contact-form-to-any-api
Files:
43 added
7 edited

Legend:

Unmodified
Added
Removed
  • contact-form-to-any-api/trunk/README.txt

    r3016044 r3037812  
    11=== Contact Form to Any API ===
    2 Contributors: itpathsolutions,mayur8991,pateljaymin,vickymakwana1111
    3 Tags: rest api, api, contact form, crm, lead, pro, export, contact form 7
     2Contributors: itpathsolutions,mayur8991,pateljaymin,
     3Tags: rest api, api, contact form, crm, lead, pro, export, contact form 7
    44Requires at least: 6.0
    55Tested up to: 6.4
    66Requires PHP: 7.4
    7 Stable tag: 1.1.8
     7Stable tag: 1.1.
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3535* Multi File Upload Support <strong><a href="https://www.contactformtoapi.com/pricing/" target="_blank">(PRO)</a></strong>
    3636* Compatible with Multiline files upload for contact form 7 Plugin <strong><a href="https://www.contactformtoapi.com/pricing/" target="_blank">(PRO)</a></strong>
     37
     38
    3739* Save CF7 Entries Directly on Google Sheet <strong><a href="https://www.contactformtoapi.com/pricing/" target="_blank">(Coming Soon with PRO)</a></strong>
    3840* Paid Plugin customization support based on Requirment <strong><a href="https://www.contactformtoapi.com/#contact_us" target="_blank">(Contact us)</a></strong>
     
    6466* Compatible with Multiline files upload for contact form 7 Plugin
    6567* Choose when to send data to API
     68
     69
    6670* Paid plugin customization support
    6771* Paid oauth 2.0 API Integration support
     
    8488* Bats CRM
    8589* FRS Labs API
     90
     91
     92
    8693* And many more
    8794
     
    156163
    157164== Changelog ==
     165
     166
     167
     168
    158169
    159170= 1.1.8 =
  • contact-form-to-any-api/trunk/admin/class-cf7-to-any-api-admin.php

    r3016044 r3037812  
    112112        if(is_multisite()){
    113113            if(!is_plugin_active_for_network('contact-form-7/wp-contact-form-7.php')){
    114                 echo '<div class="notice notice-warning is-dismissible">
    115                      <p>'.__( 'Contact form 7 API integrations requires CONTACT FORM 7 Plugin to be installed and active', 'contact-form-to-any-api' ).'</p>
    116                 </div>';
     114
     115                echo '<div class="notice notice-warning is-dismissible"><p>'.esc_html__( 'Contact form 7 API integrations requires CONTACT FORM 7 Plugin to be installed and active', 'contact-form-to-any-api' ).'</p></div>';
    117116            }
    118117        }else{
    119             if(!is_plugin_active('contact-form-7/wp-contact-form-7.php')){
    120                 echo '<div class="notice notice-warning is-dismissible">
    121                      <p>'.__( 'Contact form 7 API integrations requires CONTACT FORM 7 Plugin to be installed and active', 'contact-form-to-any-api' ).'</p>
    122                 </div>';
     118            if(!is_plugin_active('contact-form-7/wp-contact-form-7.php')){             
     119                echo '<div class="notice notice-warning is-dismissible">
     120                     <p>' . esc_html__( 'Contact form 7 API integrations requires CONTACT FORM 7 Plugin to be installed and active', 'contact-form-to-any-api' ) . '</p>
     121                  </div>';
     122
    123123            }
    124124        }
     
    204204            $form_name = get_post_meta($post_id,'cf7anyapi_selected_form',true);
    205205            if($form_name){
    206                 echo '<a href="'.site_url()."/wp-admin/admin.php?page=wpcf7&post=".$form_name."&action=edit".'" target="_blank">'.get_the_title($form_name).'</a>';
     206                echo '<a href="' . esc_url( site_url() . '/wp-admin/admin.php?page=wpcf7&post=' . $form_name . '&action=edit' ) . '" target="_blank">' . esc_html( get_the_title( $form_name ) ) . '</a>';
     207
    207208            }
    208209           
     
    313314
    314315                $options['cf7anyapi_selected_form'] = (int)stripslashes($_POST['cf7anyapi_selected_form']);
    315                 $options['cf7anyapi_base_url'] = sanitize_url($_POST['cf7anyapi_base_url']);
     316                $options['cf7anyapi_base_url'] = _url($_POST['cf7anyapi_base_url']);
    316317                if(isset($_POST['cf7anyapi_basic_auth'])){
    317318                    $options['cf7anyapi_basic_auth'] = sanitize_text_field($_POST['cf7anyapi_basic_auth']);
     
    408409        }
    409410
    410         if($wpdb->get_var(sprintf("SHOW TABLES LIKE '%s%s'", $wpdb->prefix, 'cf_entries')) != $wpdb->prefix . 'cf_entries'){
     411        if($wpdb->get_var(sprintf("SHOW TABLES LIKE '%s%s'", $wpdb->prefix, 'cf_entries'){
    411412            $charset_collate = $wpdb->get_charset_collate();
    412413            $table_name2 = $wpdb->prefix.'cf7anyapi_entries';
     
    516517                foreach($cf7anyapi_form_field as $key => $value){
    517518
    518                     // if you would like to check if the submitted data is numeric or not
    519                    
    520                     // if(is_numeric($posted_data[$key]) && !is_array($posted_data[$key])){
    521                     //  $api_post_array[$value] = (int)sanitize_text_field($posted_data[$key]);
    522                     // }
    523                     // else{
    524                     //  $api_post_array[$value] = (is_array($posted_data[$key]) ? implode(',', self::Cf7_To_Any_Api_sanitize_array($posted_data[$key])) : sanitize_text_field($posted_data[$key]));
    525                     // }
    526                    
    527                     //Submitted data as string only
    528519                    $api_post_array[$value] = (is_array($posted_data[$key]) ? implode(',', self::Cf7_To_Any_Api_sanitize_array($posted_data[$key])) : sanitize_text_field($posted_data[$key]));
    529520
     
    696687        $wpdb->insert($table,$data);
    697688    }
     689
    698690    public static function delete_cf7_records(){
    699         global $wpdb;
    700         // Get user input from the HTTP request
    701         $record_id = $_POST['id'];
    702         // Use prepare() to create a prepared statement
    703         $table_entries = $wpdb->prefix.'cf7anyapi_entries';
    704         $table = $wpdb->prefix.'cf7anyapi_entry_id';
    705         if ( !empty($record_id) && ( isset($_POST['cf_to_any_api_entrie_del_nonce']) && wp_verify_nonce($_POST['cf_to_any_api_entrie_del_nonce'],'cf_to_any_api_entrie_del_nonce') )  ) {
    706             // Use $wpdb->prepare() to safely insert user input into the query
    707             $query_entries = $wpdb->prepare("DELETE FROM $table_entries WHERE data_id IN ($record_id)", $record_id);
    708             $query_id = $wpdb->prepare("DELETE FROM $table WHERE id IN ($record_id)", $record_id);
    709             // Execute the prepared statements
    710             $result_entries = $wpdb->query($query_entries);
    711             $result_id = $wpdb->query($query_id);
     691
     692        if ( !empty($_POST['id']) && ( isset($_POST['nonce']) && wp_verify_nonce($_POST['nonce'],'cf_to_any_api_entrie_del_nonce') )  ) {
     693            global $wpdb;
     694            $record_id = isset($_POST['id']) ? $_POST['id'] : array();
     695            $placeholders = implode(',', array_fill(0, count($record_id), '%d'));
     696
     697            $table_entries = $wpdb->prefix.'cf7anyapi_entries';
     698            $table = $wpdb->prefix.'cf7anyapi_entry_id';
     699
     700            $result_entries = $wpdb->query($wpdb->prepare("DELETE FROM $table_entries WHERE data_id IN ($placeholders)", $record_id));
     701            $result_id = $wpdb->query($wpdb->prepare("DELETE FROM $table WHERE id IN ($placeholders)", $record_id));
    712702            if ($record_id !== false) {
    713703                echo json_encode(array('status' => 1, 'Message' => 'Success'));
    714704            }else {
    715             echo json_encode(array('status' => -1, 'Message' => 'Failed'));
     705            echo json_encode(array('status' => -1, 'Message' => 'Failed'));
    716706            }
    717707        }else {
    718708            echo json_encode(array('status' => -1, 'Message' => 'Invalid'));
    719709        }
    720 
    721710        exit();
    722711    }
     712
    723713    public function _cf7_api_deactivation_feedback_popup(){
    724714        $screen = get_current_screen();
  • contact-form-to-any-api/trunk/admin/js/cf7-to-any-api-admin.js

    r3016044 r3037812  
    5757
    5858        $('.cf7anyapi_bulk_log_delete').on('click',function(){
     59
     60
     61
     62
     63
     64
    5965
    60             var cf_to_any_api_log_del_nonce = jQuery(".cf7_to_any_api_page_cf7anyapi_logs #cf_to_any_api_log_del_nonce").val();
    61             var data = {
    62                     'action': 'cf7_to_any_api_bulk_log_delete',
    63                     'cf_to_any_api_log_del_nonce' : cf_to_any_api_log_del_nonce,
    64                 };
    65 
    66             var cf7anyapi_response = cf7anyapi_ajax_request(data);
    67             cf7anyapi_response.done(function(result){
    68                 window.location.reload();
    69             });
     66                var cf7anyapi_response = cf7anyapi_ajax_request(data);
     67                cf7anyapi_response.done(function(result){
     68                    window.location.reload();
     69                });
     70            }
    7071        });
    7172
     
    114115                        className: 'cf7toanyapi-btn-delete',
    115116                        action: function(){
    116                             var array = [];
     117                            var = [];
    117118                            jQuery('.cf7toanyapi_dataid.selected').each(function(i){
    118                                 array.push($(this).attr('data-id'));
     119                                .push($(this).attr('data-id'));
    119120                            });
    120121                            //console.log(array);
    121                             var cf_to_any_api_entrie_del_nonce = jQuery('#cf_to_any_api_entrie_del_nonce').val();
    122                             let data_ids = array.toString();
     122                            var nonce = jQuery('#cf_to_any_api_entrie_del_nonce').val();
     123                            let data_ids = array.toString();
    123124                            if(confirm("Are you Sure you want to delete selected records?") == true)
    124125                            {
     
    130131                                        data:{
    131132                                            action : 'delete_records',
    132                                             cf_to_any_api_entrie_del_nonce : cf_to_any_api_entrie_del_nonce,
     133                                            nonce,
    133134                                            id : data_ids,
    134135                                        },
  • contact-form-to-any-api/trunk/admin/partials/cf7-to-any-api-admin-display-docs.php

    r2986529 r3037812  
    3838            </code>
    3939            <p><b><?php esc_html_e( 'Authorization having Username & Password with Base64 ?', 'contact-form-to-any-api' ); ?></br>
    40                <?php printf(esc_html__( 'to convert online %1$sclick here%2$s and put it on header ', 'contact-form-to-any-api' ),'<a href="https://www.base64encode.net/" target="_blank">','</a>'); ?></b></p>
     40
     41               <?php __( 'To convert online <a href="https://www.base64encode.net/" target="_blank"> click here </a> and put it in the header.', 'contact-form-to-any-api' ); ?></b></p>
    4142            <b><?php esc_html_e( 'Example', 'contact-form-to-any-api' ); ?></b><code>
    4243                <pre>
     
    6263        <h5><?php esc_html_e( 'Logs', 'contact-form-to-any-api' ); ?></h5>
    6364            <ol>
    64                 <li><?php printf(esc_html__( 'After submitting data you can see your data in %1$sLogs%2$s tab.', 'contact-form-to-any-api' ),'<b>','</b>'); ?></li>
     65                <li><?php ); ?></li>
    6566                <li><?php esc_html_e( 'You can see your API logs and its data which is submitted by user', 'contact-form-to-any-api' ); ?></li>
    66                 <li><?php printf(esc_html__( 'You can see your %1$sAPI response too%2$s.', 'contact-form-to-any-api' ),'<b>','</b>'); ?></li>
     67                <li><?php '); ?></li>
    6768                <?php esc_html_e( 'Ex. ', 'contact-form-to-any-api' ); ?><img src="<?php echo plugins_url().'/contact-form-to-any-api/admin/images/logs.png';?>" alt="" style="height:100%; width:100%;">
    6869            </ol>
     
    7475            <ol>
    7576                <li><?php esc_html_e( 'Select the form and its data will display.', 'contact-form-to-any-api' ); ?></li>               
    76                 <li><?php printf(esc_html__( 'You can download your data in %1$sCSV%2$s, %1$sExcel%2$s, %1$sPDF%2$s and also you can %1$sPrint%2$s your data.', 'contact-form-to-any-api' ),'<b>','</b>'); ?></li>
     77                <li><?php ); ?></li>
    7778                <?php esc_html_e( 'Ex. ', 'contact-form-to-any-api' ); ?><img src="<?php echo plugins_url().'/contact-form-to-any-api/admin/images/entries.png';?>" alt="" style="height:100%; width:100%;">
    7879            </ol>
     
    9798                    </li>
    9899
    99                     <li><?php printf(esc_html__( '%1$sUnsupported JSON Format:%2$s Required %3$s%4$sPro Version%5$s%6$s', 'contact-form-to-any-api' ),'<b>','</b>','<a href="https://www.contactformtoapi.com/pricing/#pricing" class="cf7_to_any_api_doc_link" target="_blank">','<strong>','</strong>','</a>'); ?></br>
     100                    <li><?php ); ?></br>
    100101                    <code>
    101102            <pre>
     
    112113                </code>
    113114
    114                 <h5><?php printf(esc_html__( '%1$sYour API has Unsupported format of json ?? Don\'t worry our development team can customize our plugin as per your need%2$s %3$sClick here to contact us%4$s', 'contact-form-to-any-api' ),'<b>','</b>','<a target="_blank" href="https://www.itpathsolutions.com/contact-us/">','</a>'); ?></h5>
     115                <h5><?php ); ?></h5>
    115116                </li>
    116117            </ol>
     
    168169         <div class="tab-pane fade cf7anyapi_full_width" id="v-pills-contact-us" role="tabpanel" aria-labelledby="v-pills-contact-us-tab">
    169170        <h5><?php esc_html_e( 'Contact Us', 'contact-form-to-any-api' ); ?></h5><br>
    170            <h5><?php printf(esc_html__( 'Email : %1$ssupport@contactformtoapi.com%2$s', 'contact-form-to-any-api' ),'<a href="mailto:support@contactformtoapi.com">','</a>'); ?></h5>
    171            <p><?php printf(esc_html__( 'Need Help with Plugin Integration ? %1$sClick to Connect us%2$s', 'contact-form-to-any-api' ),'<a target="_blank" href="https://www.contactformtoapi.com/#contact_us">','</a>'); ?></p>
     171           <h5><?php ); ?></h5>
     172           <p><?php ); ?></p>
    172173        </div>
    173174        </div>
  • contact-form-to-any-api/trunk/admin/partials/cf7-to-any-api-admin-entries.php

    r3016044 r3037812  
    7171            ?>             
    7272                <div id="table_data">
    73                 <!-- <input type="submit" class="btn-delete cf7toanyapi_btn_delete" value="Delete"> -->
    7473                    <table class="tbl table table-striped table-bordered cf7toanyapi_table" id="cf7toanyapi_table">
    75                         <?php  echo wp_nonce_field('cf_to_any_api_entrie_del_nonce','cf_to_any_api_entrie_del_nonce' ); ?>
     74                        <?php echo wp_nonce_field('cf_to_any_api_entrie_del_nonce','cf_to_any_api_entrie_del_nonce' ); ?>
    7675                        <thead>
    7776                            <tr class="cf7toanyapi_dataid_all">                             
  • contact-form-to-any-api/trunk/cf7-to-any-api.php

    r3016044 r3037812  
    1717 * Plugin URI:        https://wordpress.org/plugins/contact-form-to-any-api/
    1818 * Description:       Send CF7 Lead/Data to CRM or Any REST API.
    19  * Version:           1.1.8
    20  * Author:            IT Path Solutions PVT LTD
     19 * Version:           1.1.
     20 * Author:            IT Path Solutions
    2121 * Author URI:        https://www.itpathsolutions.com/
    2222 * License:           GPL-2.0+
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'CF7_TO_ANY_API_VERSION', '1.1.8' );
     38define( 'CF7_TO_ANY_API_VERSION', '1.1.' );
    3939
    4040define( 'CF7_CURL_DOMAIN', 'https://www.contactformtoapi.com' );
  • contact-form-to-any-api/trunk/includes/class-cf7-to-any-api-activator.php

    r2901022 r3037812  
    3434            if(!is_plugin_active_for_network('contact-form-7/wp-contact-form-7.php')){
    3535                deactivate_plugins(plugin_basename( __FILE__));
    36                  wp_die( __( 'Please activate'.' <a href="' . esc_url('https://wordpress.org/plugins/contact-form-7/').'" target="_blank">Contact Form 7.</a>', 'contact-form-to-any-api' ), 'Plugin dependency check', array( 'back_link' => true ) );
     36                 wp_die( __( 'Please activate" target="_blank">Contact Form 7.</a>', 'contact-form-to-any-api' ), 'Plugin dependency check', array( 'back_link' => true ) );
    3737            }
    3838        }else{
    3939            if(!in_array( 'contact-form-7/wp-contact-form-7.php', apply_filters( 'active_plugins', get_option('active_plugins')))){
    4040                deactivate_plugins(plugin_basename( __FILE__));
    41                 wp_die( __( 'Please activate'.' <a href="' . esc_url('https://wordpress.org/plugins/contact-form-7/').'" target="_blank">Contact Form 7.</a>', 'contact-form-to-any-api' ), 'Plugin dependency check', array( 'back_link' => true ) );
     41                wp_die( __( 'Please activate" target="_blank">Contact Form 7.</a>', 'contact-form-to-any-api' ), 'Plugin dependency check', array( 'back_link' => true ) );
    4242            }
    4343        }
Note: See TracChangeset for help on using the changeset viewer.