2
0

fix(wp): 🐛 Shortcode default URL

This commit is contained in:
Baptiste Arnaud
2022-03-21 15:54:10 +01:00
parent 53fb34d2ad
commit 5d3010d280
4 changed files with 13 additions and 7 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "wordpress", "name": "wordpress",
"version": "2.1.1", "version": "2.1.2",
"main": "index.js", "main": "index.js",
"repository": "https://github.com/typebot-io/wordpress.git", "repository": "https://github.com/typebot-io/wordpress.git",
"author": "baptisteArno", "author": "baptisteArno",
@ -10,7 +10,7 @@
}, },
"scripts": { "scripts": {
"deploy": "yarn copy && yarn commit", "deploy": "yarn copy && yarn commit",
"copy": "svn copy ./trunk ./tags/2.1.1", "copy": "svn copy ./trunk ./tags/2.1.2",
"commit": "svn ci -m 'Deploy 2.1'" "commit": "svn ci -m 'Fix shortcode default url'"
} }
} }

View File

@ -5,7 +5,7 @@ Requires at least: 5.0
Tested up to: 5.9.1 Tested up to: 5.9.1
License: GPL 2.0 License: GPL 2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.txt License URI: http://www.gnu.org/licenses/gpl-2.0.txt
Stable Tag: 2.1.1 Stable Tag: 2.1.2
Build beautiful conversational forms Build beautiful conversational forms
@ -26,6 +26,9 @@ This plugin relies on Typebot which is a tool that allows you to create conversa
3. Activate your Typebot with the "Typebot" admin button located in the sidebar 3. Activate your Typebot with the "Typebot" admin button located in the sidebar
== Changelog == == Changelog ==
= 2.1.2 =
* Fix shortcode default bot URL
= 2.1.0 = = 2.1.0 =
* Added auto open delay for bubble embed * Added auto open delay for bubble embed

View File

@ -227,7 +227,7 @@ class Typebot_Public
$width = '100%'; $width = '100%';
$height = '500px'; $height = '500px';
$bg_color = 'rgba(255, 255, 255, 0)'; $bg_color = 'rgba(255, 255, 255, 0)';
$url = sanitize_text_field($attributes['url']); $url = get_option('url');
if (is_array($attributes)) { if (is_array($attributes)) {
if (array_key_exists('width', $attributes)) { if (array_key_exists('width', $attributes)) {
$width = sanitize_text_field($attributes['width']); $width = sanitize_text_field($attributes['width']);
@ -238,6 +238,9 @@ class Typebot_Public
if (array_key_exists('background-color', $attributes)) { if (array_key_exists('background-color', $attributes)) {
$bg_color = sanitize_text_field($attributes['background-color']); $bg_color = sanitize_text_field($attributes['background-color']);
} }
if (array_key_exists('url', $attributes)) {
$url = sanitize_text_field($attributes['url']);
}
} }
$container_id = 'typebot-container-' . $this->generateRandomString(4); $container_id = 'typebot-container-' . $this->generateRandomString(4);

View File

@ -3,7 +3,7 @@
/** /**
* Plugin Name: Typebot * Plugin Name: Typebot
* Description: Convert more with conversational forms * Description: Convert more with conversational forms
* Version: 2.1.1 * Version: 2.1.2
* Author: Typebot * Author: Typebot
* Author URI: http://typebot.io/ * Author URI: http://typebot.io/
* License: GPL-2.0+ * License: GPL-2.0+
@ -16,7 +16,7 @@ if (!defined('WPINC')) {
die(); die();
} }
define('TYPEBOT_VERSION', '2.1.1'); define('TYPEBOT_VERSION', '2.1.2');
function activate_typebot() function activate_typebot()
{ {