Plugin Directory

Changeset 1677083


Ignore:
Timestamp:
06/12/2017 11:33:22 PM (9 years ago)
Author:
followize
Message:

Correções de erro

Location:
followize-extension-cf7
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • followize-extension-cf7/tags/0.2.2/Helper/utils.helper.php

    r1650670 r1677083  
    1212    public static function get_fields_tag_value( $fields, $posted_data )
    1313    {
     14        if ( ! self::is_valid_array( $fields ) ) {
     15            return array();
     16        }
     17
    1418        foreach ( $fields as &$field ) {
    1519            $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 ) );
    1721        }
    1822
     
    2226    public static function get_custom_fields_tag_value( $fields, $posted_data )
    2327    {
     28        $list = array();
     29
     30        if ( ! self::is_valid_array( $fields ) ) {
     31            return $list;
     32        }
     33
    2434        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 ) );
    2741        }
    2842
     
    3246    public static function get_hidden_fields( $posted_data )
    3347    {
    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' ) ) );
    3549    }
    3650
     
    283297    }
    284298
    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 ] ) ) {
    288302            return $default;
    289303        }
    290304
    291         return ( $arr[ $prop ] ) ? $arr[ $prop ] : $default;
     305        return $arr[ $prop ];
    292306    }
    293307
     
    324338        return $fields;
    325339    }
     340
     341    public static function is_valid_array( $array ) {
     342        return ( is_array( $array ) && ! empty( $array ) );
     343    }
    326344}
  • followize-extension-cf7/tags/0.2.2/followize-extension-cf7.php

    r1671852 r1677083  
    33    Plugin Name: Followize Extension - Contact Form 7
    44    Plugin URI: https://www.followize.com.br/
    5     Version: 0.2.1
     5    Version: 0.2.2
    66    Author: Followize
    77    Author URI: https://www.followize.com.br/
     
    2121    const PLUGIN_SLUG = 'followize-extension-cf7';
    2222    const API_URL     = 'https://www.followize.com.br/api/v2/Leads/';
     23    const VERSION     = '0.2.2';
    2324
    2425    public static function uses( $class_name, $location )
  • followize-extension-cf7/tags/0.2.2/readme.txt

    r1671852 r1677083  
    11=== Followize Extension - Contact Form 7 ===
     2
    23Contributors: followize, daniel-developer
    34Tags: CRM, CRM tools, lead capture, lead collection, lead management, lead tracking, leads, cf7, contactform7
    45Requires at least: 4.0
    56Tested up to: 4.8
    6 Stable tag: 0.2.1
     7Stable tag: 0.2.2
    78License: GPLv2
    89License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1112
    1213== Description ==
     14
    1315Este 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.
    1416
     
    1820
    1921== Installation ==
     22
    20231. Faça upload deste plugin em seu WordPress, e ative-o;
    21242. Crie seu formulário utilizando o Contact Form 7 e acesse a aba "Followize" na administração do formulário criado;
     
    2427
    2528== Screenshots ==
     29
    26301. Aba de configuração do plugin
    2731
    2832== Changelog ==
     33
     34= 0.2.2 - 12-06-2017 =
     35
     36* Corrigindo mensagem de aviso quando não é cadastrado campos personalizados no formulário
    2937
    3038= 0.2.1 - 06-06-2017 =
  • followize-extension-cf7/trunk/Helper/utils.helper.php

    r1650670 r1677083  
    1212    public static function get_fields_tag_value( $fields, $posted_data )
    1313    {
     14        if ( ! self::is_valid_array( $fields ) ) {
     15            return array();
     16        }
     17
    1418        foreach ( $fields as &$field ) {
    1519            $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 ) );
    1721        }
    1822
     
    2226    public static function get_custom_fields_tag_value( $fields, $posted_data )
    2327    {
     28        $list = array();
     29
     30        if ( ! self::is_valid_array( $fields ) ) {
     31            return $list;
     32        }
     33
    2434        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 ) );
    2741        }
    2842
     
    3246    public static function get_hidden_fields( $posted_data )
    3347    {
    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' ) ) );
    3549    }
    3650
     
    283297    }
    284298
    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 ] ) ) {
    288302            return $default;
    289303        }
    290304
    291         return ( $arr[ $prop ] ) ? $arr[ $prop ] : $default;
     305        return $arr[ $prop ];
    292306    }
    293307
     
    324338        return $fields;
    325339    }
     340
     341    public static function is_valid_array( $array ) {
     342        return ( is_array( $array ) && ! empty( $array ) );
     343    }
    326344}
  • followize-extension-cf7/trunk/followize-extension-cf7.php

    r1671852 r1677083  
    33    Plugin Name: Followize Extension - Contact Form 7
    44    Plugin URI: https://www.followize.com.br/
    5     Version: 0.2.1
     5    Version: 0.2.2
    66    Author: Followize
    77    Author URI: https://www.followize.com.br/
     
    2121    const PLUGIN_SLUG = 'followize-extension-cf7';
    2222    const API_URL     = 'https://www.followize.com.br/api/v2/Leads/';
     23    const VERSION     = '0.2.2';
    2324
    2425    public static function uses( $class_name, $location )
  • followize-extension-cf7/trunk/readme.txt

    r1671852 r1677083  
    11=== Followize Extension - Contact Form 7 ===
     2
    23Contributors: followize, daniel-developer
    34Tags: CRM, CRM tools, lead capture, lead collection, lead management, lead tracking, leads, cf7, contactform7
    45Requires at least: 4.0
    56Tested up to: 4.8
    6 Stable tag: 0.2.1
     7Stable tag: 0.2.2
    78License: GPLv2
    89License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1112
    1213== Description ==
     14
    1315Este 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.
    1416
     
    1820
    1921== Installation ==
     22
    20231. Faça upload deste plugin em seu WordPress, e ative-o;
    21242. Crie seu formulário utilizando o Contact Form 7 e acesse a aba "Followize" na administração do formulário criado;
     
    2427
    2528== Screenshots ==
     29
    26301. Aba de configuração do plugin
    2731
    2832== Changelog ==
     33
     34= 0.2.2 - 12-06-2017 =
     35
     36* Corrigindo mensagem de aviso quando não é cadastrado campos personalizados no formulário
    2937
    3038= 0.2.1 - 06-06-2017 =
Note: See TracChangeset for help on using the changeset viewer.