Changeset 3194673
- Timestamp:
- 11/22/2024 05:43:18 AM (17 months ago)
- Location:
- zoho-crm-forms/trunk
- Files:
-
- 5 edited
-
Readme.txt (modified) (2 diffs)
-
includes/crmcontactform7.php (modified) (2 diffs)
-
includes/crmcontactformfieldsmapping.php (modified) (2 diffs)
-
includes/crmcontactformgenerator.php (modified) (1 diff)
-
index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
zoho-crm-forms/trunk/Readme.txt
r3194617 r3194673 7 7 Author: Zoho CRM 8 8 Tested up to: 6.7 9 Stable tag: 1.8.0. 29 Stable tag: 1.8.0.3 10 10 License: GPLv2 or later 11 Version: 1.8.0. 211 Version: 1.8.0.3 12 12 License URI: http://www.gnu.org/licenses/gpl-2.0.html 13 13 … … 311 311 1.8.0.2 312 312 Php latest version compatibility checking 313 1.8.0.3 314 Php latest version compatibility checking 313 315 314 316 == Upgrade notice == -
zoho-crm-forms/trunk/includes/crmcontactform7.php
r3193765 r3194673 5 5 require_once('crmcontactformgenerator.php'); 6 6 add_action('wpcf7_before_send_mail', 'zcfcontact_forms_submitdata'); 7 8 7 function zcfreplace_key_function($all_fields, $key1, $key2) { 8 if (!is_array($all_fields) || !array_key_exists($key1, $all_fields)) { 9 return $all_fields; 10 } 9 11 $keys = array_keys($all_fields); 10 $index = array_search($key1, $keys); 12 $values = array_values($all_fields); 13 $index = array_search($key1, $keys, true); 11 14 if ($index !== false) { 12 15 $keys[$index] = $key2; 13 $all_fields = array_combine($keys, $all_fields); 14 } 15 return $all_fields; 16 } 17 return array_combine($keys, $values); 16 18 } 17 19 … … 57 59 } 58 60 59 $mapped_array = $check_map_exist['fields'];61 $mapped_array = isset($check_map_exist['fields']) && is_array($check_map_exist['fields']) ? $check_map_exist['fields'] : []; 60 62 $mapped_array_key_labels = array_keys($mapped_array); 61 63 $get_json_array = $wpdb->get_results($wpdb->prepare("select ID,post_content from $wpdb->posts where ID=%d", $post_id)); -
zoho-crm-forms/trunk/includes/crmcontactformfieldsmapping.php
r3178280 r3194673 213 213 if (preg_match('/^thirdpartyfield/', $data_key)) { 214 214 $thirdparty_key = ltrim($data_key, 'thirdpartyfield_'); 215 $thirdparty_labels[$thirdparty_key] = $data_val; // Make thirdparty label array215 $thirdparty_labels[$thirdparty_key] = $data_val; 216 216 } 217 217 … … 219 219 $crm_field_key = ltrim($data_key, 'crm_fields_'); 220 220 if ($data_val != '--None--') { 221 $crm_labels[$crm_field_key] = $data_val; // Make crm labels array -take only mapped values 222 } 223 } 224 } 225 $get_keys_crm_labels = array_keys($crm_labels); // get keys from crm labels- to prepare mapped thirdparty labels 226 221 $crm_labels[$crm_field_key] = $data_val; 222 } 223 } 224 } 225 $get_keys_crm_labels = is_array($crm_labels) ? array_keys($crm_labels) : []; 227 226 foreach ($thirdparty_labels as $tp_key => $tp_val) { 228 227 foreach ($get_keys_crm_labels as $index_val) { 229 if ($tp_key == $index_val) {//check crm key index with thirdparty label array 230 $thirdparty_mapped_labels[$tp_key] = $tp_val; // prepare mapped values for thirdparty label array 231 } 232 } 233 } 234 $mapped_array = array_combine($thirdparty_mapped_labels, $crm_labels); // Combine final mapped array(thirdparty, crm fields) 228 if ($tp_key == $index_val) { 229 $thirdparty_mapped_labels[$tp_key] = $tp_val; 230 } 231 } 232 } 233 if (is_array($thirdparty_mapped_labels) && is_array($crm_labels) && count($thirdparty_mapped_labels) === count($crm_labels)){ 234 $mapped_array = array_combine($thirdparty_mapped_labels, $crm_labels); 235 }else{ 236 $mapped_array = []; 237 } 235 238 $final_mapped_array = array(); 236 239 $final_mapped_array['form_title'] = $form_title; -
zoho-crm-forms/trunk/includes/crmcontactformgenerator.php
r3194617 r3194673 66 66 67 67 $FormSettings = $newform->zcfFormPropSettings($attr['name']); 68 $FormSettingsArray = is_array($FormSettings) 69 ? $FormSettings 70 : json_decode(json_encode($FormSettings), true); 68 $FormSettingsArray = is_array($FormSettings)? $FormSettings: json_decode(json_encode($FormSettings), true); 71 69 $FormSettingsArray = $FormSettingsArray ?? []; 72 70 -
zoho-crm-forms/trunk/index.php
r3194617 r3194673 4 4 * Plugin Name: Zoho CRM Lead Magnet 5 5 * Description: Websites are one of the most important sources of leads for your business. That means your CRM system should be well integrated with your website to contextually capture each and every visitor to turn them into a lead.Introducing the Zoho CRM Lead Capture plugin for Wordpress. This lets you create webforms, embed them in your website, and automatically capture leads directly into your CRM with zero attenuation.Not only is the integration easy to set-up but it's also easy on your wallet. 6 * Version: 1.8.0. 26 * Version: 1.8.0.3 7 7 * ***************************************************************************************** */ 8 8 if (!defined('ABSPATH')) 9 9 exit; 10 10 11 define( 'ZCF_VERSION', '1.8.0. 2' );11 define( 'ZCF_VERSION', '1.8.0.3' ); 12 12 define( 'ZCF_LBPLUGINFILE', __FILE__ ); 13 13 define( 'ZCF_LBPLUGIN_URL', untrailingslashit( plugins_url( '', ZCF_LBPLUGINFILE ) ) );
Note: See TracChangeset
for help on using the changeset viewer.