Changeset 1677083
- Timestamp:
- 06/12/2017 11:33:22 PM (9 years ago)
- Location:
- followize-extension-cf7
- Files:
-
- 6 edited
- 1 copied
-
tags/0.2.2 (copied) (copied from followize-extension-cf7/trunk)
-
tags/0.2.2/Helper/utils.helper.php (modified) (5 diffs)
-
tags/0.2.2/followize-extension-cf7.php (modified) (2 diffs)
-
tags/0.2.2/readme.txt (modified) (4 diffs)
-
trunk/Helper/utils.helper.php (modified) (5 diffs)
-
trunk/followize-extension-cf7.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
followize-extension-cf7/tags/0.2.2/Helper/utils.helper.php
r1650670 r1677083 12 12 public static function get_fields_tag_value( $fields, $posted_data ) 13 13 { 14 if ( ! self::is_valid_array( $fields ) ) { 15 return array(); 16 } 17 14 18 foreach ( $fields as &$field ) { 15 19 $name = preg_replace( '/\[\s*([a-zA-Z_][0-9a-zA-Z:._-]*)\s*\]/', '$1', $field ); 16 $field = self::array_to_string( @$posted_data[ $name ]);20 $field = self::array_to_string( self::get_array_prop( $posted_data, $name ) ); 17 21 } 18 22 … … 22 26 public static function get_custom_fields_tag_value( $fields, $posted_data ) 23 27 { 28 $list = array(); 29 30 if ( ! self::is_valid_array( $fields ) ) { 31 return $list; 32 } 33 24 34 foreach ( $fields as $field ) { 25 $name = preg_replace( '/\[\s*([a-zA-Z_][0-9a-zA-Z:._-]*)\s*\]/', '$1', @$field['value'] ); 26 $list[ @$field['label'] ] = self::array_to_string( @$posted_data[ $name ] ); 35 if ( ! isset( $field['value'] ) || ! isset( $field['label'] ) ) { 36 continue; 37 } 38 39 $name = preg_replace( '/\[\s*([a-zA-Z_][0-9a-zA-Z:._-]*)\s*\]/', '$1', $field['value'] ); 40 $list[ $field['label'] ] = self::array_to_string( self::get_array_prop( $posted_data, $name ) ); 27 41 } 28 42 … … 32 46 public static function get_hidden_fields( $posted_data ) 33 47 { 34 return array( 'hubUtmz' => self::array_to_string( @$posted_data['hubUtmz']) );48 return array( 'hubUtmz' => self::array_to_string( self::get_array_prop( $posted_data, 'hubUtmz' ) ) ); 35 49 } 36 50 … … 283 297 } 284 298 285 public static function get_array_prop( $arr, $prop, $default = false)286 { 287 if ( ! isset( $arr[ $prop ] ) ) {299 public static function get_array_prop( $arr, $prop, $default = '' ) 300 { 301 if ( ! isset( $arr[ $prop ] ) || empty( $arr[ $prop ] ) ) { 288 302 return $default; 289 303 } 290 304 291 return ( $arr[ $prop ] ) ? $arr[ $prop ] : $default;305 return $arr[ $prop ]; 292 306 } 293 307 … … 324 338 return $fields; 325 339 } 340 341 public static function is_valid_array( $array ) { 342 return ( is_array( $array ) && ! empty( $array ) ); 343 } 326 344 } -
followize-extension-cf7/tags/0.2.2/followize-extension-cf7.php
r1671852 r1677083 3 3 Plugin Name: Followize Extension - Contact Form 7 4 4 Plugin URI: https://www.followize.com.br/ 5 Version: 0.2. 15 Version: 0.2.2 6 6 Author: Followize 7 7 Author URI: https://www.followize.com.br/ … … 21 21 const PLUGIN_SLUG = 'followize-extension-cf7'; 22 22 const API_URL = 'https://www.followize.com.br/api/v2/Leads/'; 23 const VERSION = '0.2.2'; 23 24 24 25 public static function uses( $class_name, $location ) -
followize-extension-cf7/tags/0.2.2/readme.txt
r1671852 r1677083 1 1 === Followize Extension - Contact Form 7 === 2 2 3 Contributors: followize, daniel-developer 3 4 Tags: CRM, CRM tools, lead capture, lead collection, lead management, lead tracking, leads, cf7, contactform7 4 5 Requires at least: 4.0 5 6 Tested up to: 4.8 6 Stable tag: 0.2. 17 Stable tag: 0.2.2 7 8 License: GPLv2 8 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 11 12 12 13 == Description == 14 13 15 Este plugin foi desenvolvido para possibilitar a integração do Contact Form 7 ao Followize, um software de gestão de leads capaz de organizar e padronizar o processo de atendimento, além de analisar o desempenho da equipe comercial e ações de marketing de uma maneira objetiva, possibilitando mais produtividade e, é claro, mais lucros. 14 16 … … 18 20 19 21 == Installation == 22 20 23 1. Faça upload deste plugin em seu WordPress, e ative-o; 21 24 2. Crie seu formulário utilizando o Contact Form 7 e acesse a aba "Followize" na administração do formulário criado; … … 24 27 25 28 == Screenshots == 29 26 30 1. Aba de configuração do plugin 27 31 28 32 == Changelog == 33 34 = 0.2.2 - 12-06-2017 = 35 36 * Corrigindo mensagem de aviso quando não é cadastrado campos personalizados no formulário 29 37 30 38 = 0.2.1 - 06-06-2017 = -
followize-extension-cf7/trunk/Helper/utils.helper.php
r1650670 r1677083 12 12 public static function get_fields_tag_value( $fields, $posted_data ) 13 13 { 14 if ( ! self::is_valid_array( $fields ) ) { 15 return array(); 16 } 17 14 18 foreach ( $fields as &$field ) { 15 19 $name = preg_replace( '/\[\s*([a-zA-Z_][0-9a-zA-Z:._-]*)\s*\]/', '$1', $field ); 16 $field = self::array_to_string( @$posted_data[ $name ]);20 $field = self::array_to_string( self::get_array_prop( $posted_data, $name ) ); 17 21 } 18 22 … … 22 26 public static function get_custom_fields_tag_value( $fields, $posted_data ) 23 27 { 28 $list = array(); 29 30 if ( ! self::is_valid_array( $fields ) ) { 31 return $list; 32 } 33 24 34 foreach ( $fields as $field ) { 25 $name = preg_replace( '/\[\s*([a-zA-Z_][0-9a-zA-Z:._-]*)\s*\]/', '$1', @$field['value'] ); 26 $list[ @$field['label'] ] = self::array_to_string( @$posted_data[ $name ] ); 35 if ( ! isset( $field['value'] ) || ! isset( $field['label'] ) ) { 36 continue; 37 } 38 39 $name = preg_replace( '/\[\s*([a-zA-Z_][0-9a-zA-Z:._-]*)\s*\]/', '$1', $field['value'] ); 40 $list[ $field['label'] ] = self::array_to_string( self::get_array_prop( $posted_data, $name ) ); 27 41 } 28 42 … … 32 46 public static function get_hidden_fields( $posted_data ) 33 47 { 34 return array( 'hubUtmz' => self::array_to_string( @$posted_data['hubUtmz']) );48 return array( 'hubUtmz' => self::array_to_string( self::get_array_prop( $posted_data, 'hubUtmz' ) ) ); 35 49 } 36 50 … … 283 297 } 284 298 285 public static function get_array_prop( $arr, $prop, $default = false)286 { 287 if ( ! isset( $arr[ $prop ] ) ) {299 public static function get_array_prop( $arr, $prop, $default = '' ) 300 { 301 if ( ! isset( $arr[ $prop ] ) || empty( $arr[ $prop ] ) ) { 288 302 return $default; 289 303 } 290 304 291 return ( $arr[ $prop ] ) ? $arr[ $prop ] : $default;305 return $arr[ $prop ]; 292 306 } 293 307 … … 324 338 return $fields; 325 339 } 340 341 public static function is_valid_array( $array ) { 342 return ( is_array( $array ) && ! empty( $array ) ); 343 } 326 344 } -
followize-extension-cf7/trunk/followize-extension-cf7.php
r1671852 r1677083 3 3 Plugin Name: Followize Extension - Contact Form 7 4 4 Plugin URI: https://www.followize.com.br/ 5 Version: 0.2. 15 Version: 0.2.2 6 6 Author: Followize 7 7 Author URI: https://www.followize.com.br/ … … 21 21 const PLUGIN_SLUG = 'followize-extension-cf7'; 22 22 const API_URL = 'https://www.followize.com.br/api/v2/Leads/'; 23 const VERSION = '0.2.2'; 23 24 24 25 public static function uses( $class_name, $location ) -
followize-extension-cf7/trunk/readme.txt
r1671852 r1677083 1 1 === Followize Extension - Contact Form 7 === 2 2 3 Contributors: followize, daniel-developer 3 4 Tags: CRM, CRM tools, lead capture, lead collection, lead management, lead tracking, leads, cf7, contactform7 4 5 Requires at least: 4.0 5 6 Tested up to: 4.8 6 Stable tag: 0.2. 17 Stable tag: 0.2.2 7 8 License: GPLv2 8 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 11 12 12 13 == Description == 14 13 15 Este plugin foi desenvolvido para possibilitar a integração do Contact Form 7 ao Followize, um software de gestão de leads capaz de organizar e padronizar o processo de atendimento, além de analisar o desempenho da equipe comercial e ações de marketing de uma maneira objetiva, possibilitando mais produtividade e, é claro, mais lucros. 14 16 … … 18 20 19 21 == Installation == 22 20 23 1. Faça upload deste plugin em seu WordPress, e ative-o; 21 24 2. Crie seu formulário utilizando o Contact Form 7 e acesse a aba "Followize" na administração do formulário criado; … … 24 27 25 28 == Screenshots == 29 26 30 1. Aba de configuração do plugin 27 31 28 32 == Changelog == 33 34 = 0.2.2 - 12-06-2017 = 35 36 * Corrigindo mensagem de aviso quando não é cadastrado campos personalizados no formulário 29 37 30 38 = 0.2.1 - 06-06-2017 =
Note: See TracChangeset
for help on using the changeset viewer.