Changeset 2415572
- Timestamp:
- 11/10/2020 06:07:06 AM (5 years ago)
- Location:
- crm-thrive
- Files:
-
- 29 added
- 1 deleted
- 9 edited
-
tags/1.8 (added)
-
tags/1.8/admin (added)
-
tags/1.8/admin/class-wsl-admin.php (added)
-
tags/1.8/admin/editor-panel.php (added)
-
tags/1.8/admin/partials (added)
-
tags/1.8/admin/partials/send_to_company_field.php (added)
-
tags/1.8/admin/partials/typeform_token_field.php (added)
-
tags/1.8/crm-thrive.php (added)
-
tags/1.8/helpers.php (added)
-
tags/1.8/includes (added)
-
tags/1.8/includes/assets (added)
-
tags/1.8/includes/assets/custom.js (added)
-
tags/1.8/includes/class-wsl-api.php (added)
-
tags/1.8/includes/class-wsl-beaver-api.php (added)
-
tags/1.8/includes/class-wsl-cf7-api.php (added)
-
tags/1.8/includes/class-wsl-divi-api.php (added)
-
tags/1.8/includes/class-wsl-elementor-api.php (added)
-
tags/1.8/includes/class-wsl-gravity-api.php (added)
-
tags/1.8/includes/class-wsl-ninja-api.php (added)
-
tags/1.8/includes/class-wsl-typeform-api.php (added)
-
tags/1.8/includes/class-wsl-wpbrizy-api.php (added)
-
tags/1.8/includes/class-wsl-wpf-api.php (added)
-
tags/1.8/includes/class-wsl-wpff-api.php (added)
-
tags/1.8/includes/helpers.php (added)
-
tags/1.8/includes/wsl-base.php (added)
-
tags/1.8/readme.txt (added)
-
trunk/admin/editor-panel.php (modified) (1 diff)
-
trunk/admin/partials/typeform_token_field.php (added)
-
trunk/assets (deleted)
-
trunk/crm-thrive.php (modified) (14 diffs)
-
trunk/includes/assets (added)
-
trunk/includes/assets/custom.js (added)
-
trunk/includes/class-wsl-beaver-api.php (modified) (1 diff)
-
trunk/includes/class-wsl-typeform-api.php (modified) (2 diffs)
-
trunk/includes/class-wsl-wpbrizy-api.php (modified) (3 diffs)
-
trunk/includes/class-wsl-wpf-api.php (modified) (1 diff)
-
trunk/includes/class-wsl-wpff-api.php (modified) (1 diff)
-
trunk/includes/helpers.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
crm-thrive/trunk/admin/editor-panel.php
r2238078 r2415572 3 3 $meta = wsl_get_cf7_post_settings($post->id); 4 4 $api_obj = new Wsl_Api(); 5 $companies = $api_obj->get_companies(); 5 $company = $api_obj->get_companies(); 6 7 //var_dump($post->id); 6 8 7 9 wp_nonce_field( 'cf7_wsl_editor_panel', 'cf7_wsl_editor_panel_nonce' ); -
crm-thrive/trunk/crm-thrive.php
r2415019 r2415572 5 5 * Plugin URI: https://www.crmthrive.com/ 6 6 * Description: Save the leads to Thrive system generated by various form plugins. We currently support CF7, Ninja Forms, WP Forms, Gravity Forms and Elementor Builder. 7 * Version: 1. 77 * Version: 1.8 8 8 * Author: Thrive 9 9 * Author URI: https://profiles.wordpress.org/crmthrive/ … … 42 42 require_once WSL_INCLUDES_DIR . '/class-wsl-divi-api.php'; 43 43 require_once WSL_INCLUDES_DIR . '/class-wsl-wpff-api.php'; 44 require_once WSL_INCLUDES_DIR . '/class-wsl-wpformidable-api.php';45 44 require_once WSL_INCLUDES_DIR . '/class-wsl-typeform-api.php'; 46 45 require_once WSL_INCLUDES_DIR . '/class-wsl-beaver-api.php'; … … 55 54 // define the wpcf7_submit callback 56 55 function wsl_wpcf7_submit( $instance, $result ) { 57 56 if(!is_send_to_crm()){ 57 return false; 58 } 58 59 if($result['status'] == 'validation_failed'){ 59 60 return false; … … 62 63 63 64 $send_to_crm = wsl_get_cf7_post_setting('send_to_crm',$instance->id()); 65 64 66 if($send_to_crm != 1){ 65 67 return false; … … 69 71 $laravel_api->set_submission_instance($submission); 70 72 $laravel_api->call(); 71 return true;73 //return true; 72 74 } 73 75 //Contact Form 7 submit hook … … 111 113 112 114 function wsl_ninja_forms_after_submission( $form_data ){ 115 if(!is_send_to_crm()){ 116 return false; 117 } 113 118 $laravel_api = new Wsl_Ninja_Api($form_data['fields_by_key']); 114 119 $laravel_api->set_submission_instance($form_data); … … 118 123 119 124 function wsl_wpf_process_entry_save( $fields, $entry, $form_id, $form_data ) { 120 125 if(!is_send_to_crm()){ 126 return false; 127 } 121 128 $laravel_api = new Wsl_Wpf_Api($fields); 122 129 $laravel_api->set_submission_instance($form_data); … … 126 133 127 134 function wsl_gravityform_submission( $entry, $form) { //Gravity forms 128 135 if(!is_send_to_crm()){ 136 return false; 137 } 129 138 $laravel_api = new Wsl_Gravity_Api($entry, $form); 130 139 $laravel_api->set_submission_instance($form); … … 137 146 138 147 function wsl_elementor_pro($record, $handler ){ 148 if(!is_send_to_crm()){ 149 return false; 150 } 139 151 $fields = $record->get( 'fields' ); 140 152 $form_settings = $record->get( 'form_settings' ); … … 148 160 149 161 function wsl_divi(){ 162 if(!is_send_to_crm()){ 163 return false; 164 } 150 165 reset($_POST); 151 166 $key = key($_POST); … … 160 175 function wsl_fluentforms($entryId, $formData, $form) 161 176 { 177 if(!is_send_to_crm()){ 178 return false; 179 } 162 180 $laravel_api = new Wsl_Wpff_Api($form, $formData); 163 181 $laravel_api->set_submission_instance($form); … … 169 187 170 188 function wsl_typeform() { 189 if(!is_send_to_crm()){ 190 return false; 191 } 171 192 $fields = typeform_api($_POST['response_id']); 172 193 … … 180 201 181 202 function wsl_beaver(){ 203 if(!is_send_to_crm()){ 204 return false; 205 } 182 206 $laravel_api = new Wsl_Beaver_Api($_POST); 183 207 $laravel_api->set_submission_instance($_POST); … … 189 213 190 214 function wsl_brizy(){ 215 if(!is_send_to_crm()){ 216 return false; 217 } 191 218 $fields_data = $_POST["data"]; 192 219 193 220 $laravel_api = new Wsl_Brizy_Api($fields_data); 194 221 $laravel_api->set_submission_instance($_POST); -
crm-thrive/trunk/includes/class-wsl-beaver-api.php
r2415019 r2415572 158 158 } 159 159 if(strpos(strtolower($field['name']), 'name') !== false){ 160 $value = $ this->form_values[$field->name];160 $value = $field['name']; 161 161 $this->unset_additional_data($field['name']); 162 162 break; -
crm-thrive/trunk/includes/class-wsl-typeform-api.php
r2415019 r2415572 164 164 } 165 165 if(strpos(strtolower($field['name']), 'name') !== false){ 166 $value = $ this->form_values[$field->name];166 $value = $field['name']; 167 167 $this->unset_additional_data($field['name']); 168 168 break; … … 268 268 ); 269 269 } 270 271 270 return $fields; 272 271 } -
crm-thrive/trunk/includes/class-wsl-wpbrizy-api.php
r2415019 r2415572 133 133 $name = 'state'; 134 134 }elseif($v["type"] == "Tel"){ 135 $name = "Phone"; 135 $name = "phone"; 136 }elseif(strtolower($v["type"]) == 'text'){ 137 $name = $label; 138 }elseif(strtolower($v["type"]) == 'email'){ 139 $name = strtolower($v["type"]); 136 140 }else{ 137 $name = $v["type"];141 $name = strtolower($v["label"]); 138 142 } 139 143 … … 183 187 } 184 188 if(strpos(strtolower($field['name']), 'name') !== false){ 185 $value = $ this->form_values[$field->name];189 $value = $field['value']; 186 190 $this->unset_additional_data($field['name']); 187 191 break; … … 289 293 }elseif($f_val["type"] == "Tel"){ 290 294 $name = "phone"; 295 }elseif(strtolower($f_val["type"]) == 'text'){ 296 $name = $f_val["label"]; 297 }elseif(strtolower($f_val["type"]) == 'email'){ 298 $name = strtolower($f_val["type"]); 291 299 }else{ 292 $name = strtolower($f_val[" type"]);300 $name = strtolower($f_val["label"]); 293 301 } 294 302 295 303 $fields[] = array( 296 "name" => strtolower($name),304 "name" => $name, 297 305 "value" => $f_val["value"], 298 306 "id" => $f_key, -
crm-thrive/trunk/includes/class-wsl-wpf-api.php
r2328704 r2415572 151 151 } 152 152 if(strpos(strtolower($field['name']), 'name') !== false){ 153 $value = $ this->form_values[$field->name];153 $value = $field['name']; 154 154 $this->unset_additional_data($field['name']); 155 155 break; -
crm-thrive/trunk/includes/class-wsl-wpff-api.php
r2396628 r2415572 170 170 } 171 171 if(strpos(strtolower($field['name']), 'name') !== false){ 172 $value = $ this->form_values[$field->name];172 $value = $field['name']; 173 173 $this->unset_additional_data($field['name']); 174 174 break; -
crm-thrive/trunk/includes/helpers.php
r2415019 r2415572 18 18 function wsl_get_cf7_post_settings($post_id){ 19 19 $meta = get_post_meta($post_id,'_wsl_settings',TRUE); 20 //var_dump($meta); 20 21 if(!is_array($meta)){ 21 22 return wsl_get_default_cf7_post_settings(); … … 69 70 70 71 function typeform_script() { 71 wp_register_script( "my_custom_script", WP_PLUGIN_URL.'/crm-thrive/assets/custom.js', array('jquery') );72 wp_register_script( "my_custom_script", plugin_dir_url( __FILE__ ).'assets/custom.js', array('jquery') ); 72 73 wp_localize_script( 'my_custom_script', 'localize', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ))); 73 74 … … 75 76 wp_enqueue_script( 'my_custom_script' ); 76 77 } 77 add_action( ' plugins_loaded', 'typeform_script' );78 add_action( 'admin_enqueue_scripts', 'typeform_script' ); 78 79 79 80 function typeform_api($response_id){ -
crm-thrive/trunk/readme.txt
r2415026 r2415572 4 4 Requires at least: 2.0 5 5 Tested up to: 5.5.3 6 Stable tag: 1. 76 Stable tag: 1.8 7 7 Requires PHP: 5.2.4 8 8 License: GPLv2 or later … … 54 54 * Added Beaver Builder support 55 55 * Added Brizy Builder support 56 57 = 1.8 = 58 * Bug Fixes For additional fields 59 * Error issues fixed 60 * Enable sending to CRM Issues fixed
Note: See TracChangeset
for help on using the changeset viewer.