Changeset 2701025
- Timestamp:
- 03/29/2022 07:01:41 AM (4 years ago)
- Location:
- codup-wp-freshsales/trunk
- Files:
-
- 7 edited
-
includes/class-codup-freshsales-cf.php (modified) (9 diffs)
-
includes/class-codup-freshsales-ff.php (modified) (5 diffs)
-
includes/class-codup-freshsales-gf.php (modified) (9 diffs)
-
includes/class-codup-wp-freshsales.php (modified) (7 diffs)
-
includes/freshsales-lead-fields.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
wp-freshsales-integration.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
codup-wp-freshsales/trunk/includes/class-codup-freshsales-cf.php
r2556757 r2701025 78 78 */ 79 79 public function get_cf7_fields( $form ) { 80 $fields = [];80 $fields = array(); 81 81 $manager = WPCF7_FormTagsManager::get_instance(); 82 82 $tags = $manager->scan( $form->form ); … … 88 88 } 89 89 90 $fields[] = (object) [90 $fields[] = (object) array( 91 91 'name' => $value->name, 92 92 'type' => rtrim( $value->type, '*' ), 93 ];93 ); 94 94 } 95 95 return $fields; … … 101 101 */ 102 102 public function get_lead_fields() { 103 $lead_fields = [];103 $lead_fields = array(); 104 104 include 'freshsales-lead-fields.php'; 105 105 return $lead_fields; … … 115 115 public function validate_freshsales_fields( $validator ) { 116 116 if ( wp_verify_nonce( ( filter_input( INPUT_POST, 'wpcf7-freshsales', 'enable' ) != null ) && sanitize_text_field( wp_unslash( isset( $_POST['wpcf7-freshsales']['enable'] ) ) ) == 'yes' && isset( $_POST['wpcf7-freshsales']['last_name'] ) && empty( sanitize_text_field( wp_unslash( $_POST['wpcf7-freshsales']['last_name'] ) ) ) ) ) { 117 $validator->add_error( 'freshsales.last_name', 100, [ 'message' => __( 'Last name is required.', 'codup-wp-freshsales' ) ]);117 $validator->add_error( 'freshsales.last_name', 100, array( 'message' => __( 'Last name is required.', 'codup-wp-freshsales' ) ) ); 118 118 } 119 119 } … … 143 143 */ 144 144 public function get_saved_setting( $args ) { 145 return get_option( 'cwpfs_cf7_' . $args->id(), []);145 return get_option( 'cwpfs_cf7_' . $args->id(), array() ); 146 146 } 147 147 … … 155 155 156 156 // If email is sent or failed. 157 if ( empty( $result['status'] ) || ! in_array( $result['status'], [ 'mail_sent', 'mail_failed' ]) ) {157 if ( empty( $result['status'] ) || ! in_array( $result['status'], array( 'mail_sent', 'mail_failed' ) ) ) { 158 158 return; 159 159 } … … 179 179 ); 180 180 181 $args = [];181 $args = array(); 182 182 foreach ( $settings as $key => $value ) { 183 183 if ( is_array( $value ) ) { … … 227 227 'Content-Type' => 'application/json', 228 228 ); 229 $lead_data = apply_filters( 'cwpfs_create_lead_args', [ 'lead' => $args ]);229 $lead_data = apply_filters( 'cwpfs_create_lead_args', array( 'lead' => $args ) ); 230 230 $response = wp_remote_post( 231 231 $url, … … 272 272 */ 273 273 public function sanitize_form_settings( $settings, $form_id ) { 274 $fields_filter_cf = filter_input( INPUT_POST, 'wpcf7-freshsales', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );275 $company_settings = array_map( 'sanitize_text_field', wp_unslash( $settings['company'] ) );276 $custom_settings = array_map( 'sanitize_text_field', wp_unslash( $settings['custom_field'] ) );277 $fields = array_map( 'sanitize_text_field', wp_unslash( $fields_filter_cf ) );278 $fields['company'] = $company_settings;274 $fields_filter_cf = filter_input( INPUT_POST, 'wpcf7-freshsales', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ); 275 $company_settings = array_map( 'sanitize_text_field', wp_unslash( $settings['company'] ) ); 276 $custom_settings = array_map( 'sanitize_text_field', wp_unslash( $settings['custom_field'] ) ); 277 $fields = array_map( 'sanitize_text_field', wp_unslash( $fields_filter_cf ) ); 278 $fields['company'] = $company_settings; 279 279 $fields['custom_field'] = $custom_settings; 280 $form_settings = apply_filters( 'cwpfs_form_settings', $fields, $form_id );280 $form_settings = apply_filters( 'cwpfs_form_settings', $fields, $form_id ); 281 281 return $form_settings; 282 282 } -
codup-wp-freshsales/trunk/includes/class-codup-freshsales-ff.php
r2556757 r2701025 62 62 public function get_my_new_settings( $values ) { 63 63 $form_id_fields = filter_input( INPUT_GET, 'id', FILTER_DEFAULT ); 64 $lead_fields = $this->get_lead_fields();65 $form_fields = $this->get_cff_fields( $values );66 $id = sanitize_text_field( $form_id_fields );67 $currentformid = (int) $id;64 $lead_fields = $this->get_lead_fields(); 65 $form_fields = $this->get_cff_fields( $values ); 66 $id = sanitize_text_field( $form_id_fields ); 67 $currentformid = (int) $id; 68 68 $this->formidable_save_settings( $currentformid ); 69 69 $settings = $this->get_formidableform_saved_setting( $currentformid ); … … 78 78 */ 79 79 public function get_formidableform_saved_setting( $form_id ) { 80 return get_option( 'cwpfs_fform_' . $form_id, []);80 return get_option( 'cwpfs_fform_' . $form_id, array() ); 81 81 } 82 82 … … 87 87 */ 88 88 public function get_lead_fields() { 89 $lead_fields = [];89 $lead_fields = array(); 90 90 include 'freshsales-lead-fields.php'; 91 91 return $lead_fields; … … 120 120 */ 121 121 public function sanitize_form_settings( $settings, $form_id ) { 122 $fields_filter_ff = filter_input( INPUT_POST, 'wpff-freshsales', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );123 $company_settings = array_map( 'sanitize_text_field', wp_unslash( $settings['company'] ) );124 $custom_settings = array_map( 'sanitize_text_field', wp_unslash( $settings['custom_field'] ) );125 $fields = array_map( 'sanitize_text_field', wp_unslash( $fields_filter_ff ) );126 $fields['company'] = $company_settings;122 $fields_filter_ff = filter_input( INPUT_POST, 'wpff-freshsales', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ); 123 $company_settings = array_map( 'sanitize_text_field', wp_unslash( $settings['company'] ) ); 124 $custom_settings = array_map( 'sanitize_text_field', wp_unslash( $settings['custom_field'] ) ); 125 $fields = array_map( 'sanitize_text_field', wp_unslash( $fields_filter_ff ) ); 126 $fields['company'] = $company_settings; 127 127 $fields['custom_field'] = $custom_settings; 128 $form_settings = apply_filters( 'formidable_form_settings', $fields, $form_id );128 $form_settings = apply_filters( 'formidable_form_settings', $fields, $form_id ); 129 129 return $form_settings; 130 130 } … … 154 154 $settings = $this->get_formidableform_saved_setting( $form_id ); 155 155 unset( $settings['enable'] ); 156 $lead_data = apply_filters( 'cwpfs_fform_create_lead', [ 'lead' => $settings ]);156 $lead_data = apply_filters( 'cwpfs_fform_create_lead', array( 'lead' => $settings ) ); 157 157 158 158 if ( ! $this->lead_generation_enabled( $form_id ) ) { -
codup-wp-freshsales/trunk/includes/class-codup-freshsales-gf.php
r2556757 r2701025 28 28 add_filter( 'gform_form_settings_menu', array( $this, 'freshsales_settings_menu_tab' ) ); 29 29 add_action( 'gform_form_settings_page_freshsales_form_settings_page', array( $this, 'freshsales_form_settings_page' ) ); 30 31 add_filter( 'gform_field_value_source', array( $this,'my_custom_population_source' ) );32 add_filter( 'gform_field_value_campaign', array( $this,'my_custom_population_campaign' ) );33 add_filter( 'gform_field_value_medium', array( $this,'my_custom_population_medium' ) );34 add_filter( 'gform_field_value_term', array( $this,'my_custom_population_term' ) );35 add_filter( 'gform_field_value_content', array( $this,'my_custom_population_content' ) );36 add_filter( 'gform_field_value_refurl', array( $this,'populate_referral_refurl' ) );37 add_filter( 'gform_field_value_embdurl', array( $this,'populate_referral_embdurl' ) );38 } 39 40 function populate_referral_refurl( $value ) {30 31 add_filter( 'gform_field_value_source', array( $this, 'my_custom_population_source' ) ); 32 add_filter( 'gform_field_value_campaign', array( $this, 'my_custom_population_campaign' ) ); 33 add_filter( 'gform_field_value_medium', array( $this, 'my_custom_population_medium' ) ); 34 add_filter( 'gform_field_value_term', array( $this, 'my_custom_population_term' ) ); 35 add_filter( 'gform_field_value_content', array( $this, 'my_custom_population_content' ) ); 36 add_filter( 'gform_field_value_refurl', array( $this, 'populate_referral_refurl' ) ); 37 add_filter( 'gform_field_value_embdurl', array( $this, 'populate_referral_embdurl' ) ); 38 } 39 40 function populate_referral_refurl( $value ) { 41 41 $refurl = $_SERVER['HTTP_REFERER']; 42 return esc_url_raw( $refurl);43 } 44 function populate_referral_embdurl( $value ) {45 $embdurl = $_SERVER['REQUEST_URI'];42 return esc_url_raw( $refurl ); 43 } 44 function populate_referral_embdurl( $value ) { 45 $embdurl = $_SERVER['REQUEST_URI']; 46 46 $http_name = $_SERVER['HTTP_HOST']; 47 $total = $http_name . $embdurl;48 return esc_url_raw( $embdurl);47 $total = $http_name . $embdurl; 48 return esc_url_raw( $embdurl ); 49 49 } 50 50 function my_custom_population_medium( $value ) { … … 64 64 return $utm_campaign; 65 65 } 66 public function my_custom_population_source() {66 public function my_custom_population_source() { 67 67 $utm_source = $_GET['utm_source']; 68 68 return $utm_source; … … 90 90 GFFormSettings::page_header(); 91 91 $form_id_fieldsmap_gf = filter_input( INPUT_GET, 'id', FILTER_DEFAULT ); 92 $id = sanitize_text_field( $form_id_fieldsmap_gf );93 $currentformid = (int) $id;94 $forminfo = RGFormsModel::get_form( $currentformid );92 $id = sanitize_text_field( $form_id_fieldsmap_gf ); 93 $currentformid = (int) $id; 94 $forminfo = RGFormsModel::get_form( $currentformid ); 95 95 $this->gravityform_save_settings( $currentformid ); 96 96 $form_fields = $this->get_all_form_fields( $currentformid ); … … 130 130 */ 131 131 public function get_lead_fields() { 132 $lead_fields = [];132 $lead_fields = array(); 133 133 include 'freshsales-lead-fields.php'; 134 134 return $lead_fields; … … 156 156 if ( isset( $_POST['gf_save_form'] ) ) { 157 157 $form_id_save_gf = filter_input( INPUT_GET, 'id', FILTER_DEFAULT ); 158 $id = sanitize_text_field( $form_id_save_gf );159 $currentformid = (int) $id;160 $form_id = $currentformid;158 $id = sanitize_text_field( $form_id_save_gf ); 159 $currentformid = (int) $id; 160 $form_id = $currentformid; 161 161 if ( ! empty( $_POST ) && isset( $_POST['wpgf-freshsales'] ) ) { 162 162 if ( ! filter_input( INPUT_POST, 'cwpfs-form_nonce' ) != null || wp_verify_nonce( ! filter_input( INPUT_POST, ' cwpfs-form_nonce ' ), 'cwpfs-form-settings' ) ) { … … 178 178 */ 179 179 public function get_gravityform_saved_setting( $form_id ) { 180 return get_option( 'cwpfs_gform_' . $form_id, []);180 return get_option( 'cwpfs_gform_' . $form_id, array() ); 181 181 } 182 182 … … 190 190 */ 191 191 public function sanitize_gravityform_settings( $settings, $form_id ) { 192 $fields_filter = filter_input( INPUT_POST, 'wpgf-freshsales', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );193 $form_id_fields_gf = filter_input( INPUT_GET, 'id', FILTER_DEFAULT );194 $id = sanitize_text_field( $form_id_fields_gf );195 $currentformid = (int) $id;196 $form_id = $currentformid;197 $company_settings = array_map( 'sanitize_text_field', wp_unslash( $settings['company'] ) );192 $fields_filter = filter_input( INPUT_POST, 'wpgf-freshsales', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY ); 193 $form_id_fields_gf = filter_input( INPUT_GET, 'id', FILTER_DEFAULT ); 194 $id = sanitize_text_field( $form_id_fields_gf ); 195 $currentformid = (int) $id; 196 $form_id = $currentformid; 197 $company_settings = array_map( 'sanitize_text_field', wp_unslash( $settings['company'] ) ); 198 198 $custom_field_settings = array_map( 'sanitize_text_field', wp_unslash( $settings['custom_field'] ) ); 199 $fields = array_map( 'sanitize_text_field', wp_unslash( $fields_filter ) );200 $fields['company'] = $company_settings;199 $fields = array_map( 'sanitize_text_field', wp_unslash( $fields_filter ) ); 200 $fields['company'] = $company_settings; 201 201 $fields['custom_field'] = $custom_field_settings; 202 $form_settings = apply_filters( 'gravity_form_settings', $fields, $form_id );202 $form_settings = apply_filters( 'gravity_form_settings', $fields, $form_id ); 203 203 return $form_settings; 204 204 } … … 230 230 $settings = $this->get_gravityform_saved_setting( $currentformid ); 231 231 unset( $settings['enable'] ); 232 $lead_data = apply_filters( 'cwpfs_gform_create_lead', [ 'lead' => $settings ]);232 $lead_data = apply_filters( 'cwpfs_gform_create_lead', array( 'lead' => $settings ) ); 233 233 234 234 if ( ! $this->lead_generation_enabled( $currentformid ) ) { … … 243 243 $post_url = "https://{$freshsales->domain}/api/leads"; 244 244 245 246 245 foreach ( $lead_data['lead'] as $field_name => $field_value ) { 247 if (is_array( $field_value ) && $field_name == 'company'){246 if ( is_array( $field_value ) && $field_name == 'company' ) { 248 247 foreach ( $lead_data['lead']['company'] as $field_name1 => $field_value1 ) { 249 248 $lead_data['lead']['company'][ $field_name1 ] = rgar( $entry, $field_value1 ); 250 249 } 251 } 252 elseif(is_array( $field_value ) && $field_name == 'custom_field'){ 250 } elseif ( is_array( $field_value ) && $field_name == 'custom_field' ) { 253 251 foreach ( $lead_data['lead']['custom_field'] as $field_name2 => $field_value2 ) { 254 252 $lead_data['lead']['custom_field'][ $field_name2 ] = rgar( $entry, $field_value2 ); 255 253 } 254 } else { 255 $lead_data['lead'][ $field_name ] = rgar( $entry, $field_value ); 256 256 } 257 else {258 $lead_data['lead'][ $field_name ] = rgar( $entry, $field_value );259 }260 257 } 261 258 GFCommon::log_debug( 'gform_after_submission: body => ' . print_r( $lead_data['lead'], true ) ); -
codup-wp-freshsales/trunk/includes/class-codup-wp-freshsales.php
r2556757 r2701025 25 25 * @var $settings 26 26 */ 27 public $settings = [];27 public $settings = array(); 28 28 /** 29 29 * Short description for file … … 31 31 * @var validation_notice 32 32 */ 33 public $validation_notice = [];33 public $validation_notice = array(); 34 34 /** 35 35 * Constructor. … … 74 74 */ 75 75 public function save_settings() { 76 $domain_wp_save = filter_input( INPUT_POST, 'cwpfs_domain', FILTER_DEFAULT );76 $domain_wp_save = filter_input( INPUT_POST, 'cwpfs_domain', FILTER_DEFAULT ); 77 77 $api_key_wp_save = filter_input( INPUT_POST, 'cwpfs_api_key', FILTER_DEFAULT ); 78 $domain = sanitize_text_field( $domain_wp_save );79 $api_key = sanitize_text_field( $api_key_wp_save );80 $settings = apply_filters(78 $domain = sanitize_text_field( $domain_wp_save ); 79 $api_key = sanitize_text_field( $api_key_wp_save ); 80 $settings = apply_filters( 81 81 'cwpfs_settings', 82 [82 array( 83 83 'api_key' => $api_key, 84 84 'domain' => $domain, 85 ]85 ) 86 86 ); 87 87 update_option( 'cwpfs_settings', $settings ); … … 95 95 */ 96 96 public function cwpfs_get_old_value( $name ) { 97 if ( ( isset( $_POST[ 'cwpfs_' .$name ] ) ) ) {97 if ( ( isset( $_POST[ 'cwpfs_' . $name ] ) ) ) { 98 98 return ( sanitize_text_field( wp_unslash( $_POST[ 'cwpfs_' . $name ] ) ) ); 99 99 } elseif ( isset( $this->settings[ $name ] ) ) { … … 108 108 * @return boolean 109 109 */ 110 public function validate_freshsales_api_domain() {111 $domain_wp = filter_input( INPUT_POST, 'cwpfs_domain', FILTER_DEFAULT );112 $api_key_wp = filter_input( INPUT_POST, 'cwpfs_api_key', FILTER_DEFAULT );113 $domain = sanitize_text_field( $domain_wp);110 public function validate_freshsales_api_domain() { 111 $domain_wp = filter_input( INPUT_POST, 'cwpfs_domain', FILTER_DEFAULT ); 112 $api_key_wp = filter_input( INPUT_POST, 'cwpfs_api_key', FILTER_DEFAULT ); 113 $domain = sanitize_text_field( $domain_wp ); 114 114 $api_key = sanitize_text_field( $api_key_wp ); 115 115 $url = "https://{$domain}/api/leads/filters"; … … 118 118 'Content-Type' => 'application/json', 119 119 ); 120 $response = wp_remote_get( $url, [ 'headers' => $headers ]);120 $response = wp_remote_get( $url, array( 'headers' => $headers ) ); 121 121 $response_code = wp_remote_retrieve_response_code( $response ); 122 122 123 123 if ( 200 != $response_code ) { 124 124 // print_r($this->validation_notice = [ 125 // 'message' => _e( 'Invalid Domain or Api Key.', 'codup-wp-freshsales' ),126 // 'type' => 'error',125 // 'message' => _e( 'Invalid Domain or Api Key.', 'codup-wp-freshsales' ), 126 // 'type' => 'error', 127 127 // ]); 128 $this->validation_notice = [128 $this->validation_notice = array( 129 129 'message' => __( 'Invalid Domain or Api Key.', 'codup-wp-freshsales' ), 130 130 'type' => 'error', 131 ];131 ); 132 132 return false; 133 133 } else { 134 $this->validation_notice = [134 $this->validation_notice = array( 135 135 'message' => __( 'Settings saved successfully. Please go to "freshsales" tab on form add/edit page for mapping.', 'codup-wp-freshsales' ), 136 136 'type' => 'updated', 137 ];137 ); 138 138 return true; 139 139 } … … 146 146 */ 147 147 public static function get_freshsales_settings() { 148 $saved_freshsales = get_option( 'cwpfs_settings', []);148 $saved_freshsales = get_option( 'cwpfs_settings', array() ); 149 149 if ( ! empty( $saved_freshsales ) ) { 150 150 return $saved_freshsales; -
codup-wp-freshsales/trunk/includes/freshsales-lead-fields.php
r2556757 r2701025 6 6 */ 7 7 8 $lead_fields['first_name'] = (object) [8 $lead_fields['first_name'] = (object) array( 9 9 'name' => 'first_name', 10 10 'label' => __( 'First Name', 'codup-wp-freshsales' ), 11 11 'is_single' => true, 12 ];13 $lead_fields['last_name'] = (object) [12 ); 13 $lead_fields['last_name'] = (object) array( 14 14 'name' => 'last_name', 15 15 'label' => __( 'Last Name *', 'codup-wp-freshsales' ), 16 16 'is_single' => true, 17 ];18 $lead_fields['mobile_number'] = (object) [17 ); 18 $lead_fields['mobile_number'] = (object) array( 19 19 'name' => 'mobile_number', 20 20 'label' => __( 'Mobile', 'codup-wp-freshsales' ), 21 21 'is_single' => true, 22 ];23 $lead_fields['work_number'] = (object) [22 ); 23 $lead_fields['work_number'] = (object) array( 24 24 'name' => 'work_number', 25 25 'label' => __( 'Work', 'codup-wp-freshsales' ), 26 26 'is_single' => true, 27 ];28 $lead_fields['email'] = (object) [27 ); 28 $lead_fields['email'] = (object) array( 29 29 'name' => 'email', 30 30 'label' => __( 'Email', 'codup-wp-freshsales' ), 31 31 'is_single' => true, 32 ];33 $lead_fields['job_title'] = (object) [32 ); 33 $lead_fields['job_title'] = (object) array( 34 34 'name' => 'job_title', 35 35 'label' => __( 'Job title', 'codup-wp-freshsales' ), 36 36 'is_single' => true, 37 ];38 $lead_fields['department'] = (object) [37 ); 38 $lead_fields['department'] = (object) array( 39 39 'name' => 'department', 40 40 'label' => __( 'Department', 'codup-wp-freshsales' ), 41 41 'is_single' => true, 42 ];43 $lead_fields['address'] = (object) [42 ); 43 $lead_fields['address'] = (object) array( 44 44 'name' => 'address', 45 45 'label' => __( 'Address', 'codup-wp-freshsales' ), 46 46 'is_single' => true, 47 ];48 $lead_fields['city'] = (object) [47 ); 48 $lead_fields['city'] = (object) array( 49 49 'name' => 'city', 50 50 'label' => __( 'City', 'codup-wp-freshsales' ), 51 51 'is_single' => true, 52 ];53 $lead_fields['state'] = (object) [52 ); 53 $lead_fields['state'] = (object) array( 54 54 'name' => 'state', 55 55 'label' => __( 'State', 'codup-wp-freshsales' ), 56 56 'is_single' => true, 57 ];58 $lead_fields['zipcode'] = (object) [57 ); 58 $lead_fields['zipcode'] = (object) array( 59 59 'name' => 'zipcode', 60 60 'label' => __( 'Zipcode', 'codup-wp-freshsales' ), 61 61 'is_single' => true, 62 ];63 $lead_fields['country'] = (object) [62 ); 63 $lead_fields['country'] = (object) array( 64 64 'name' => 'country', 65 65 'label' => __( 'Country', 'codup-wp-freshsales' ), 66 66 'is_single' => true, 67 ];67 ); 68 68 69 // from here70 $lead_fields['medium'] = (object) [69 // from here 70 $lead_fields['medium'] = (object) array( 71 71 'name' => 'medium', 72 72 'label' => __( 'Medium', 'codup-wp-freshsales' ), 73 73 'is_single' => true, 74 ];74 ); 75 75 76 76 77 // custom fields78 $lead_fields['custom_field'] = (object) [79 'is_single' => false,80 'cf_term' => (object) [77 // custom fields 78 $lead_fields['custom_field'] = (object) array( 79 'is_single' => false, 80 'cf_term' => (object) array( 81 81 'name' => '[custom_field][cf_term]', 82 82 'label' => __( 'Term', 'codup-wp-freshsales' ), 83 83 'is_single' => false, 84 ],85 'cf_content' => (object) [84 ), 85 'cf_content' => (object) array( 86 86 'name' => '[custom_field][cf_content]', 87 87 'label' => __( 'Content', 'codup-wp-freshsales' ), 88 88 'is_single' => false, 89 ],90 'cf_http_referral' => (object) [89 ), 90 'cf_http_referral' => (object) array( 91 91 'name' => '[custom_field][cf_http_referral]', 92 92 'label' => __( 'HTTP Referral', 'codup-wp-freshsales' ), 93 93 'is_single' => false, 94 ],95 'cf_embed_url' => (object) [94 ), 95 'cf_embed_url' => (object) array( 96 96 'name' => '[custom_field][cf_embed_url]', 97 97 'label' => __( 'Embed URL', 'codup-wp-freshsales' ), 98 98 'is_single' => false, 99 ],100 'cf_source_name' => (object) [99 ), 100 'cf_source_name' => (object) array( 101 101 'name' => '[custom_field][cf_source_name]', 102 102 'label' => __( 'Source Name', 'codup-wp-freshsales' ), 103 103 'is_single' => false, 104 ],105 'cf_campaign_name' => (object) [104 ), 105 'cf_campaign_name' => (object) array( 106 106 'name' => '[custom_field][cf_campaign_name]', 107 107 'label' => __( 'Campaign Name', 'codup-wp-freshsales' ), 108 108 'is_single' => false, 109 ],110 'cf_message' => (object) [109 ), 110 'cf_message' => (object) array( 111 111 'name' => '[custom_field][cf_message]', 112 112 'label' => __( 'Message', 'codup-wp-freshsales' ), 113 113 'is_single' => false, 114 ],115 'cf_project_detail' => (object) [114 ), 115 'cf_project_detail' => (object) array( 116 116 'name' => '[custom_field][cf_project_detail]', 117 117 'label' => __( 'Project Detail', 'codup-wp-freshsales' ), 118 118 'is_single' => false, 119 ],120 'cf_start_date' => (object) [119 ), 120 'cf_start_date' => (object) array( 121 121 'name' => '[custom_field][cf_start_date]', 122 122 'label' => __( 'Start Date', 'codup-wp-freshsales' ), 123 123 'is_single' => false, 124 ],125 'cf_budget' => (object) [124 ), 125 'cf_budget' => (object) array( 126 126 'name' => '[custom_field][cf_budget]', 127 127 'label' => __( 'Budget', 'codup-wp-freshsales' ), 128 128 'is_single' => false, 129 ],130 ];129 ), 130 ); 131 131 132 // to here133 $lead_fields['company'] = (object) [132 // to here 133 $lead_fields['company'] = (object) array( 134 134 'is_single' => false, 135 'name' => (object) [135 'name' => (object) array( 136 136 'name' => '[company][name]', 137 137 'label' => __( 'Company Name', 'codup-wp-freshsales' ), 138 138 'is_single' => false, 139 ],140 'address' => (object) [139 ), 140 'address' => (object) array( 141 141 'name' => '[company][address]', 142 142 'label' => __( 'Company Address', 'codup-wp-freshsales' ), 143 143 'is_single' => false, 144 ],145 'city' => (object) [144 ), 145 'city' => (object) array( 146 146 'name' => '[company][city]', 147 147 'label' => __( 'Company City', 'codup-wp-freshsales' ), 148 148 'is_single' => false, 149 ],150 'state' => (object) [149 ), 150 'state' => (object) array( 151 151 'name' => '[company][state]', 152 152 'label' => __( 'Company State', 'codup-wp-freshsales' ), 153 153 'is_single' => false, 154 ],155 'country' => (object) [154 ), 155 'country' => (object) array( 156 156 'name' => '[company][country]', 157 157 'label' => __( 'Company Country', 'codup-wp-freshsales' ), 158 158 'is_single' => false, 159 ],160 'zipcode' => (object) [159 ), 160 'zipcode' => (object) array( 161 161 'name' => '[company][zipcode]', 162 162 'label' => __( 'Company Zipcode', 'codup-wp-freshsales' ), 163 163 'is_single' => false, 164 ],165 'website' => (object) [164 ), 165 'website' => (object) array( 166 166 'name' => '[company][website]', 167 167 'label' => __( 'Company Website', 'codup-wp-freshsales' ), 168 168 'is_single' => false, 169 ],170 'phone' => (object) [169 ), 170 'phone' => (object) array( 171 171 'name' => '[company][phone]', 172 172 'label' => __( 'Company Phone', 'codup-wp-freshsales' ), 173 173 'is_single' => false, 174 ],175 ];176 $lead_fields = apply_filters( 'cwpfs_lead_field', $lead_fields );174 ), 175 ); 176 $lead_fields = apply_filters( 'cwpfs_lead_field', $lead_fields ); -
codup-wp-freshsales/trunk/readme.txt
r2556757 r2701025 3 3 Tags: contact form 7, wordpress, freshsales, Gravity Form , Formidable Form 4 4 Requires at least: 4.4 5 Tested up to: 5. 7.25 Tested up to: 5.9.2 6 6 License: GPLv2 or later 7 7 -
codup-wp-freshsales/trunk/wp-freshsales-integration.php
r2556757 r2701025 1 1 <?php 2 /**3 * MyClass Class Doc Comment4 *5 * @file6 * Description of what this module (or file) is doing.7 * @package WordPress_fresh_sales8 */9 10 2 /** 11 3 * Plugin Name: WordPress to Freshsales Integration 12 4 * Description: Create Leads on formidable forms submission , contact form 7 submission and gravity forms submission. 13 * Version: 1.3.2. 35 * Version: 1.3.2.4 14 6 * Author: codup.io 15 7 * Author URI: http://codup.io/ … … 18 10 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 19 11 * Text Domain: codup-wp-freshsales 12 * Tested up to: 5.9.2 20 13 */ 21 14
Note: See TracChangeset
for help on using the changeset viewer.