Version Description
File upload related bug fixed
Download this release
Release Info
Developer | galdub |
Plugin | Floating Chat Widget: Contact Chat Icons, Telegram Chat, Line, WeChat, Email, SMS, Call Button – Chaty |
Version | 2.8 |
Comparing to | |
See all releases |
Code changes from version 2.7.9 to 2.8
- admin/class-admin-base.php +19 -17
- cht-icons.php +2 -2
- readme.txt +4 -1
admin/class-admin-base.php
CHANGED
@@ -728,7 +728,7 @@ class CHT_Admin_Base
|
|
728 |
register_setting($this->plugin_slug, 'cht_created_on', 'chaty_sanitize_options');
|
729 |
register_setting($this->plugin_slug, 'cht_widget_title', 'chaty_sanitize_options');
|
730 |
|
731 |
-
add_action('pre_update_option_cht_widget_img', array($this, 'uploadCustomWidget'), 10, 3);
|
732 |
|
733 |
// register field section three
|
734 |
register_setting($this->plugin_slug, 'cht_active', 'chaty_sanitize_options');
|
@@ -774,26 +774,28 @@ class CHT_Admin_Base
|
|
774 |
if (!function_exists('wp_handle_upload'))
|
775 |
require_once(ABSPATH . 'wp-admin/includes/file.php');
|
776 |
|
777 |
-
$
|
778 |
-
|
|
|
779 |
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
|
|
795 |
}
|
796 |
-
return
|
797 |
}
|
798 |
|
799 |
/* returns CTA text */
|
728 |
register_setting($this->plugin_slug, 'cht_created_on', 'chaty_sanitize_options');
|
729 |
register_setting($this->plugin_slug, 'cht_widget_title', 'chaty_sanitize_options');
|
730 |
|
731 |
+
// add_action('pre_update_option_cht_widget_img', array($this, 'uploadCustomWidget'), 10, 3);
|
732 |
|
733 |
// register field section three
|
734 |
register_setting($this->plugin_slug, 'cht_active', 'chaty_sanitize_options');
|
774 |
if (!function_exists('wp_handle_upload'))
|
775 |
require_once(ABSPATH . 'wp-admin/includes/file.php');
|
776 |
|
777 |
+
if(isset($_FILES[$option])) {
|
778 |
+
$file = &$_FILES[ $option ];
|
779 |
+
$type = wp_check_filetype( $file['name'] );
|
780 |
|
781 |
+
if ( ! in_array( $type['ext'], $allowed_ext ) ) {
|
782 |
+
return $old_value;
|
783 |
+
}
|
784 |
|
785 |
+
if ( isset( $old_value['file'] ) ) {
|
786 |
+
wp_delete_file( $old_value['file'] );
|
787 |
+
}
|
788 |
|
789 |
+
$overrides = array( 'test_form' => false );
|
790 |
+
$movefile = wp_handle_upload( $file, $overrides );
|
791 |
+
if ( $movefile && empty( $movefile['error'] ) ) {
|
792 |
+
return array(
|
793 |
+
'file' => $movefile['file'],
|
794 |
+
'url' => $movefile['url']
|
795 |
+
);
|
796 |
+
}
|
797 |
}
|
798 |
+
return array();
|
799 |
}
|
800 |
|
801 |
/* returns CTA text */
|
cht-icons.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
Author URI: https://premio.io/downloads/chaty/
|
8 |
Text Domain: chaty
|
9 |
Domain Path: /languages
|
10 |
-
Version: 2.
|
11 |
License: GPL2
|
12 |
*/
|
13 |
|
@@ -27,7 +27,7 @@ define('CHT_INC', CHT_DIR . '/includes');
|
|
27 |
define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
|
28 |
define('CHT_PLUGIN_URL', plugin_dir_url(__FILE__));
|
29 |
define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
|
30 |
-
define('CHT_VERSION', "2.
|
31 |
|
32 |
if (!function_exists('wp_doing_ajax')) {
|
33 |
function wp_doing_ajax()
|
7 |
Author URI: https://premio.io/downloads/chaty/
|
8 |
Text Domain: chaty
|
9 |
Domain Path: /languages
|
10 |
+
Version: 2.8
|
11 |
License: GPL2
|
12 |
*/
|
13 |
|
27 |
define('CHT_PRO_URL', admin_url("admin.php?page=chaty-app-upgrade"));
|
28 |
define('CHT_PLUGIN_URL', plugin_dir_url(__FILE__));
|
29 |
define('CHT_PLUGIN_BASE', plugin_basename(CHT_FILE));
|
30 |
+
define('CHT_VERSION', "2.8");
|
31 |
|
32 |
if (!function_exists('wp_doing_ajax')) {
|
33 |
function wp_doing_ajax()
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: galdub, tomeraharon, premio
|
|
3 |
Tags: whatsapp, whatsapp chat, facebook messenger, click to chat, chat, chat button, call now button, messenger, whatsapp button, chat icon, contact button, click to call
|
4 |
Requires at least: 3.1
|
5 |
Tested up to: 5.7
|
6 |
-
Stable tag: 2.
|
7 |
Plugin URI: https://premio.io/downloads/chaty/
|
8 |
|
9 |
Whatsapp, Facebook Messenger, Telegram, TikTok Viber, Email, Phone call, SMS and more with customizable chat & call buttons. Chat with your visitors on WhatsApp, Facebook Messenger, and other chat channels!
|
@@ -258,6 +258,9 @@ Yes! You can even decide what chat buttons will show up on each device (desktop/
|
|
258 |
|
259 |
== Changelog ==
|
260 |
|
|
|
|
|
|
|
261 |
= 2.7.9 =
|
262 |
Call-to-action arrow bug fixed
|
263 |
|
3 |
Tags: whatsapp, whatsapp chat, facebook messenger, click to chat, chat, chat button, call now button, messenger, whatsapp button, chat icon, contact button, click to call
|
4 |
Requires at least: 3.1
|
5 |
Tested up to: 5.7
|
6 |
+
Stable tag: 2.8
|
7 |
Plugin URI: https://premio.io/downloads/chaty/
|
8 |
|
9 |
Whatsapp, Facebook Messenger, Telegram, TikTok Viber, Email, Phone call, SMS and more with customizable chat & call buttons. Chat with your visitors on WhatsApp, Facebook Messenger, and other chat channels!
|
258 |
|
259 |
== Changelog ==
|
260 |
|
261 |
+
= 2.8 =
|
262 |
+
File upload related bug fixed
|
263 |
+
|
264 |
= 2.7.9 =
|
265 |
Call-to-action arrow bug fixed
|
266 |
|