From 5d3010d280d4e254d3af4cd324b2edfbec8e40e0 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Mon, 21 Mar 2022 15:54:10 +0100 Subject: [PATCH] =?UTF-8?q?fix(wp):=20=F0=9F=90=9B=20Shortcode=20default?= =?UTF-8?q?=20URL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/wordpress/package.json | 6 +++--- packages/wordpress/trunk/README.txt | 5 ++++- packages/wordpress/trunk/public/class-typebot-public.php | 5 ++++- packages/wordpress/trunk/typebot.php | 4 ++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/wordpress/package.json b/packages/wordpress/package.json index 7231efa5b2..abc280ae56 100644 --- a/packages/wordpress/package.json +++ b/packages/wordpress/package.json @@ -1,6 +1,6 @@ { "name": "wordpress", - "version": "2.1.1", + "version": "2.1.2", "main": "index.js", "repository": "https://github.com/typebot-io/wordpress.git", "author": "baptisteArno", @@ -10,7 +10,7 @@ }, "scripts": { "deploy": "yarn copy && yarn commit", - "copy": "svn copy ./trunk ./tags/2.1.1", - "commit": "svn ci -m 'Deploy 2.1'" + "copy": "svn copy ./trunk ./tags/2.1.2", + "commit": "svn ci -m 'Fix shortcode default url'" } } diff --git a/packages/wordpress/trunk/README.txt b/packages/wordpress/trunk/README.txt index 5e64ff7859..16cfe36dc7 100644 --- a/packages/wordpress/trunk/README.txt +++ b/packages/wordpress/trunk/README.txt @@ -5,7 +5,7 @@ Requires at least: 5.0 Tested up to: 5.9.1 License: GPL 2.0 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 @@ -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 == Changelog == += 2.1.2 = +* Fix shortcode default bot URL + = 2.1.0 = * Added auto open delay for bubble embed diff --git a/packages/wordpress/trunk/public/class-typebot-public.php b/packages/wordpress/trunk/public/class-typebot-public.php index 164c6d4b25..6dcf4acd62 100644 --- a/packages/wordpress/trunk/public/class-typebot-public.php +++ b/packages/wordpress/trunk/public/class-typebot-public.php @@ -227,7 +227,7 @@ public function add_typebot_container($attributes = []) $width = '100%'; $height = '500px'; $bg_color = 'rgba(255, 255, 255, 0)'; - $url = sanitize_text_field($attributes['url']); + $url = get_option('url'); if (is_array($attributes)) { if (array_key_exists('width', $attributes)) { $width = sanitize_text_field($attributes['width']); @@ -238,6 +238,9 @@ public function add_typebot_container($attributes = []) if (array_key_exists('background-color', $attributes)) { $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); diff --git a/packages/wordpress/trunk/typebot.php b/packages/wordpress/trunk/typebot.php index 83ef181920..b002818652 100644 --- a/packages/wordpress/trunk/typebot.php +++ b/packages/wordpress/trunk/typebot.php @@ -3,7 +3,7 @@ /** * Plugin Name: Typebot * Description: Convert more with conversational forms - * Version: 2.1.1 + * Version: 2.1.2 * Author: Typebot * Author URI: http://typebot.io/ * License: GPL-2.0+ @@ -16,7 +16,7 @@ die(); } -define('TYPEBOT_VERSION', '2.1.1'); +define('TYPEBOT_VERSION', '2.1.2'); function activate_typebot() {