Plugin Directory

Changeset 3708177


Ignore:
Timestamp:
09/22/2026 10:10:47 PM (4 weeks ago)
Author:
charlalivechat
Message:

Update to version 2.0.3 from GitHub

Location:
charla-live-chat
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • charla-live-chat/tags/2.0.3/.gitattributes

    r3676968 r3708177  
    11# Auto detect text files and perform LF normalization
    22* text=auto
     3
     4# Exclude dev/build files from distribution archives (git archive / SVN export)
     5.gitattributes export-ignore
     6.gitignore export-ignore
  • charla-live-chat/tags/2.0.3/README.txt

    r3676971 r3708177  
    44Requires at least: 3.0.1
    55Tested up to: 7.1
    6 Stable tag: 2.0.2
     6Stable tag: 2.0.3
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • charla-live-chat/tags/2.0.3/admin/class-charla-live-chat-admin.php

    r3393907 r3708177  
    118118        public function displayPluginAdminSettings() {
    119119                // set this var to be used in the settings-display view
    120                 $active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'general';
    121                 if(isset($_GET['error_message'])){
    122                         add_action('admin_notices', array($this,'charlaSettingsMessages'));
    123                         do_action( 'admin_notices', $_GET['error_message'] );
     120                $active_tab = isset( $_GET[ 'tab' ] ) ? sanitize_text_field( wp_unslash( $_GET[ 'tab' ] ) ) : 'general';
     121                if ( isset( $_GET['error_message'] ) ) {
     122                        $error_message = sanitize_text_field( wp_unslash( $_GET['error_message'] ) );
     123                        add_action( 'admin_notices', array( $this, 'charlaSettingsMessages' ) );
     124                        do_action( 'admin_notices', $error_message );
    124125                }
    125126                require_once 'partials/'.$this->plugin_name.'-admin-settings-display.php';
    … …  
    129130                switch ($error_message) {
    130131                        case '1':
    131                                 $message = __( 'There was an error adding this setting. Please try again.  If this persists, shoot us an email.', 'my-text-domain' );                 
     132                                $message = __( 'There was an error adding this setting. Please try again.  If this persists, shoot us an email.', 'charla-live-chat' );                 
    132133                                $err_code = esc_attr( 'charla_property_key_setting' );                 
    133134                                $setting_field = 'charla_property_key_setting';                 
    … …  
    184185                register_setting(
    185186                                'charla_general_settings',
    186                                 'charla_property_key_setting'
     187                                'charla_property_key_setting',
     188                                array( 'sanitize_callback' => 'sanitize_text_field' )
    187189                                );
    188190
    … …  
    218220                                $value = ($args['value_type'] == 'serialized') ? serialize($wp_data_value) : $wp_data_value;
    219221                                if($args['subtype'] != 'checkbox'){
    220                                         $prependStart = (isset($args['prepend_value'])) ? '<div class="input-prepend"> <span class="add-on">'.$args['prepend_value'].'</span>' : '';
    221                                         $prependEnd = (isset($args['prepend_value'])) ? '</div>' : '';
    222                                         $step = (isset($args['step'])) ? 'step="'.$args['step'].'"' : '';
    223                                         $min = (isset($args['min'])) ? 'min="'.$args['min'].'"' : '';
    224                                         $max = (isset($args['max'])) ? 'max="'.$args['max'].'"' : '';
     222                                        $step = isset( $args['step'] ) ? $args['step'] : '';
     223                                        $min  = isset( $args['min'] ) ? $args['min'] : '';
     224                                        $max  = isset( $args['max'] ) ? $args['max'] : '';
     225
     226                                        if ( isset( $args['prepend_value'] ) ) {
     227                                                printf( '<div class="input-prepend"> <span class="add-on">%s</span>', esc_html( $args['prepend_value'] ) );
     228                                        }
    225229                                        if(isset($args['disabled'])){
    226230                                                // hide the actual input bc if it was just a disabled input the informaiton saved in the database would be wrong - bc it would pass empty values and wipe the actual information
    227                                                 echo $prependStart.'<input type="'.$args['subtype'].'" id="'.$args['id'].'_disabled" '.$step.' '.$max.' '.$min.' name="'.$args['name'].'_disabled" size="40" disabled value="' . esc_attr($value) . '" /><input type="hidden" id="'.$args['id'].'" '.$step.' '.$max.' '.$min.' name="'.$args['name'].'" size="40" value="' . esc_attr($value) . '" />'.$prependEnd;
     231                                                printf(
     232                                                        '<input type="%1$s" id="%2$s_disabled" step="%3$s" max="%4$s" min="%5$s" name="%6$s_disabled" size="40" disabled value="%7$s" /><input type="hidden" id="%2$s" step="%3$s" max="%4$s" min="%5$s" name="%6$s" size="40" value="%7$s" />',
     233                                                        esc_attr( $args['subtype'] ),
     234                                                        esc_attr( $args['id'] ),
     235                                                        esc_attr( $step ),
     236                                                        esc_attr( $max ),
     237                                                        esc_attr( $min ),
     238                                                        esc_attr( $args['name'] ),
     239                                                        esc_attr( $value )
     240                                                );
    228241                                        } else {
    229                                                 echo $prependStart.'<input type="'.$args['subtype'].'" id="'.$args['id'].'" "'.$args['required'].'" '.$step.' '.$max.' '.$min.' name="'.$args['name'].'" size="40" value="' . esc_attr($value) . '" />'.$prependEnd;
     242                                                printf(
     243                                                        '<input type="%1$s" id="%2$s" "%3$s" step="%4$s" max="%5$s" min="%6$s" name="%7$s" size="40" value="%8$s" />',
     244                                                        esc_attr( $args['subtype'] ),
     245                                                        esc_attr( $args['id'] ),
     246                                                        esc_attr( $args['required'] ),
     247                                                        esc_attr( $step ),
     248                                                        esc_attr( $max ),
     249                                                        esc_attr( $min ),
     250                                                        esc_attr( $args['name'] ),
     251                                                        esc_attr( $value )
     252                                                );
     253                                        }
     254                                        if ( isset( $args['prepend_value'] ) ) {
     255                                                echo '</div>';
    230256                                        }
    231257                                        /*<input required="required" '.$disabled.' type="number" step="any" id="'.$this->plugin_name.'_cost2" name="'.$this->plugin_name.'_cost2" value="' . esc_attr( $cost ) . '" size="25" /><input type="hidden" id="'.$this->plugin_name.'_cost" step="any" name="'.$this->plugin_name.'_cost" value="' . esc_attr( $cost ) . '" />*/
    … …  
    233259                                } else {
    234260                                        $checked = ($value) ? 'checked' : '';
    235                                         echo '<input type="'.$args['subtype'].'" id="'.$args['id'].'" "'.$args['required'].'" name="'.$args['name'].'" size="40" value="1" '.$checked.' />';
     261                                        printf(
     262                                                '<input type="%1$s" id="%2$s" "%3$s" name="%4$s" size="40" value="1" %5$s />',
     263                                                esc_attr( $args['subtype'] ),
     264                                                esc_attr( $args['id'] ),
     265                                                esc_attr( $args['required'] ),
     266                                                esc_attr( $args['name'] ),
     267                                                esc_attr( $checked )
     268                                        );
    236269                                }
    237270                                break;
  • charla-live-chat/tags/2.0.3/admin/partials/charla-live-chat-admin-display.php

    r3393907 r3708177  
    1212 * @subpackage Charla_Live_Chat/admin/partials
    1313 */
     14
     15if ( ! defined( 'ABSPATH' ) ) {
     16        exit;
     17}
    1418?>
    1519
  • charla-live-chat/tags/2.0.3/admin/partials/charla-live-chat-admin-settings-display.php

    r2395674 r3708177  
    1212 * @subpackage PluginName/admin/partials
    1313 */
     14
     15if ( ! defined( 'ABSPATH' ) ) {
     16        exit;
     17}
    1418?>
    1519<!-- This file should primarily consist of HTML with a little bit of PHP. -->
  • charla-live-chat/tags/2.0.3/charla-live-chat.php

    r3676971 r3708177  
    1717 * Plugin URI:        https://charla.com
    1818 * Description:       Add Charla Live Chat Widget to your site without writing a single line of code.
    19  * Version:           2.0.2
     19 * Version:           2.0.3
     20 * Requires at least: 5.0
     21 * Requires PHP:      7.0
    2022 * Author:            Charla LLC
    2123 * Author URI:        https://charla.com
    … …  
    2426 * Text Domain:       charla-live-chat
    2527 * Domain Path:       /languages
     28 * WC requires at least: 6.0
     29 * WC tested up to:   9.3
    2630 */
    2731
    … …  
    3640 * Rename this for your plugin and update it as you release new versions.
    3741 */
    38 define( 'CHARLA_LIVE_CHAT_VERSION', '2.0.2' );
     42define( 'CHARLA_LIVE_CHAT_VERSION', '2.0.3' );
    3943
    4044/**
    … …  
    6064
    6165/**
     66 * Declare compatibility with WooCommerce features, including HPOS (custom order tables).
     67 */
     68add_action( 'before_woocommerce_init', function() {
     69        if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
     70                \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     71        }
     72} );
     73
     74/**
    6275 * The core plugin class that is used to define internationalization,
    6376 * admin-specific hooks, and public-facing site hooks.
  • charla-live-chat/trunk/.gitattributes

    r3676968 r3708177  
    11# Auto detect text files and perform LF normalization
    22* text=auto
     3
     4# Exclude dev/build files from distribution archives (git archive / SVN export)
     5.gitattributes export-ignore
     6.gitignore export-ignore
  • charla-live-chat/trunk/README.txt

    r3676971 r3708177  
    44Requires at least: 3.0.1
    55Tested up to: 7.1
    6 Stable tag: 2.0.2
     6Stable tag: 2.0.3
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • charla-live-chat/trunk/admin/class-charla-live-chat-admin.php

    r3393907 r3708177  
    118118        public function displayPluginAdminSettings() {
    119119                // set this var to be used in the settings-display view
    120                 $active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'general';
    121                 if(isset($_GET['error_message'])){
    122                         add_action('admin_notices', array($this,'charlaSettingsMessages'));
    123                         do_action( 'admin_notices', $_GET['error_message'] );
     120                $active_tab = isset( $_GET[ 'tab' ] ) ? sanitize_text_field( wp_unslash( $_GET[ 'tab' ] ) ) : 'general';
     121                if ( isset( $_GET['error_message'] ) ) {
     122                        $error_message = sanitize_text_field( wp_unslash( $_GET['error_message'] ) );
     123                        add_action( 'admin_notices', array( $this, 'charlaSettingsMessages' ) );
     124                        do_action( 'admin_notices', $error_message );
    124125                }
    125126                require_once 'partials/'.$this->plugin_name.'-admin-settings-display.php';
    … …  
    129130                switch ($error_message) {
    130131                        case '1':
    131                                 $message = __( 'There was an error adding this setting. Please try again.  If this persists, shoot us an email.', 'my-text-domain' );                 
     132                                $message = __( 'There was an error adding this setting. Please try again.  If this persists, shoot us an email.', 'charla-live-chat' );                 
    132133                                $err_code = esc_attr( 'charla_property_key_setting' );                 
    133134                                $setting_field = 'charla_property_key_setting';                 
    … …  
    184185                register_setting(
    185186                                'charla_general_settings',
    186                                 'charla_property_key_setting'
     187                                'charla_property_key_setting',
     188                                array( 'sanitize_callback' => 'sanitize_text_field' )
    187189                                );
    188190
    … …  
    218220                                $value = ($args['value_type'] == 'serialized') ? serialize($wp_data_value) : $wp_data_value;
    219221                                if($args['subtype'] != 'checkbox'){
    220                                         $prependStart = (isset($args['prepend_value'])) ? '<div class="input-prepend"> <span class="add-on">'.$args['prepend_value'].'</span>' : '';
    221                                         $prependEnd = (isset($args['prepend_value'])) ? '</div>' : '';
    222                                         $step = (isset($args['step'])) ? 'step="'.$args['step'].'"' : '';
    223                                         $min = (isset($args['min'])) ? 'min="'.$args['min'].'"' : '';
    224                                         $max = (isset($args['max'])) ? 'max="'.$args['max'].'"' : '';
     222                                        $step = isset( $args['step'] ) ? $args['step'] : '';
     223                                        $min  = isset( $args['min'] ) ? $args['min'] : '';
     224                                        $max  = isset( $args['max'] ) ? $args['max'] : '';
     225
     226                                        if ( isset( $args['prepend_value'] ) ) {
     227                                                printf( '<div class="input-prepend"> <span class="add-on">%s</span>', esc_html( $args['prepend_value'] ) );
     228                                        }
    225229                                        if(isset($args['disabled'])){
    226230                                                // hide the actual input bc if it was just a disabled input the informaiton saved in the database would be wrong - bc it would pass empty values and wipe the actual information
    227                                                 echo $prependStart.'<input type="'.$args['subtype'].'" id="'.$args['id'].'_disabled" '.$step.' '.$max.' '.$min.' name="'.$args['name'].'_disabled" size="40" disabled value="' . esc_attr($value) . '" /><input type="hidden" id="'.$args['id'].'" '.$step.' '.$max.' '.$min.' name="'.$args['name'].'" size="40" value="' . esc_attr($value) . '" />'.$prependEnd;
     231                                                printf(
     232                                                        '<input type="%1$s" id="%2$s_disabled" step="%3$s" max="%4$s" min="%5$s" name="%6$s_disabled" size="40" disabled value="%7$s" /><input type="hidden" id="%2$s" step="%3$s" max="%4$s" min="%5$s" name="%6$s" size="40" value="%7$s" />',
     233                                                        esc_attr( $args['subtype'] ),
     234                                                        esc_attr( $args['id'] ),
     235                                                        esc_attr( $step ),
     236                                                        esc_attr( $max ),
     237                                                        esc_attr( $min ),
     238                                                        esc_attr( $args['name'] ),
     239                                                        esc_attr( $value )
     240                                                );
    228241                                        } else {
    229                                                 echo $prependStart.'<input type="'.$args['subtype'].'" id="'.$args['id'].'" "'.$args['required'].'" '.$step.' '.$max.' '.$min.' name="'.$args['name'].'" size="40" value="' . esc_attr($value) . '" />'.$prependEnd;
     242                                                printf(
     243                                                        '<input type="%1$s" id="%2$s" "%3$s" step="%4$s" max="%5$s" min="%6$s" name="%7$s" size="40" value="%8$s" />',
     244                                                        esc_attr( $args['subtype'] ),
     245                                                        esc_attr( $args['id'] ),
     246                                                        esc_attr( $args['required'] ),
     247                                                        esc_attr( $step ),
     248                                                        esc_attr( $max ),
     249                                                        esc_attr( $min ),
     250                                                        esc_attr( $args['name'] ),
     251                                                        esc_attr( $value )
     252                                                );
     253                                        }
     254                                        if ( isset( $args['prepend_value'] ) ) {
     255                                                echo '</div>';
    230256                                        }
    231257                                        /*<input required="required" '.$disabled.' type="number" step="any" id="'.$this->plugin_name.'_cost2" name="'.$this->plugin_name.'_cost2" value="' . esc_attr( $cost ) . '" size="25" /><input type="hidden" id="'.$this->plugin_name.'_cost" step="any" name="'.$this->plugin_name.'_cost" value="' . esc_attr( $cost ) . '" />*/
    … …  
    233259                                } else {
    234260                                        $checked = ($value) ? 'checked' : '';
    235                                         echo '<input type="'.$args['subtype'].'" id="'.$args['id'].'" "'.$args['required'].'" name="'.$args['name'].'" size="40" value="1" '.$checked.' />';
     261                                        printf(
     262                                                '<input type="%1$s" id="%2$s" "%3$s" name="%4$s" size="40" value="1" %5$s />',
     263                                                esc_attr( $args['subtype'] ),
     264                                                esc_attr( $args['id'] ),
     265                                                esc_attr( $args['required'] ),
     266                                                esc_attr( $args['name'] ),
     267                                                esc_attr( $checked )
     268                                        );
    236269                                }
    237270                                break;
  • charla-live-chat/trunk/admin/partials/charla-live-chat-admin-display.php

    r3393907 r3708177  
    1212 * @subpackage Charla_Live_Chat/admin/partials
    1313 */
     14
     15if ( ! defined( 'ABSPATH' ) ) {
     16        exit;
     17}
    1418?>
    1519
  • charla-live-chat/trunk/admin/partials/charla-live-chat-admin-settings-display.php

    r2395674 r3708177  
    1212 * @subpackage PluginName/admin/partials
    1313 */
     14
     15if ( ! defined( 'ABSPATH' ) ) {
     16        exit;
     17}
    1418?>
    1519<!-- This file should primarily consist of HTML with a little bit of PHP. -->
  • charla-live-chat/trunk/charla-live-chat.php

    r3676971 r3708177  
    1717 * Plugin URI:        https://charla.com
    1818 * Description:       Add Charla Live Chat Widget to your site without writing a single line of code.
    19  * Version:           2.0.2
     19 * Version:           2.0.3
     20 * Requires at least: 5.0
     21 * Requires PHP:      7.0
    2022 * Author:            Charla LLC
    2123 * Author URI:        https://charla.com
    … …  
    2426 * Text Domain:       charla-live-chat
    2527 * Domain Path:       /languages
     28 * WC requires at least: 6.0
     29 * WC tested up to:   9.3
    2630 */
    2731
    … …  
    3640 * Rename this for your plugin and update it as you release new versions.
    3741 */
    38 define( 'CHARLA_LIVE_CHAT_VERSION', '2.0.2' );
     42define( 'CHARLA_LIVE_CHAT_VERSION', '2.0.3' );
    3943
    4044/**
    … …  
    6064
    6165/**
     66 * Declare compatibility with WooCommerce features, including HPOS (custom order tables).
     67 */
     68add_action( 'before_woocommerce_init', function() {
     69        if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
     70                \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
     71        }
     72} );
     73
     74/**
    6275 * The core plugin class that is used to define internationalization,
    6376 * admin-specific hooks, and public-facing site hooks.
Note: See TracChangeset for help on using the changeset viewer.