Skip to content

Commit

Permalink
fix(wp): 🐛 Shortcode default URL
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Mar 21, 2022
1 parent 53fb34d commit 5d3010d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/wordpress/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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'"
}
}
5 changes: 4 additions & 1 deletion packages/wordpress/trunk/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
5 changes: 4 additions & 1 deletion packages/wordpress/trunk/public/class-typebot-public.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand All @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions packages/wordpress/trunk/typebot.php
Original file line number Diff line number Diff line change
Expand Up @@ -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+
Expand All @@ -16,7 +16,7 @@
die();
}

define('TYPEBOT_VERSION', '2.1.1');
define('TYPEBOT_VERSION', '2.1.2');

function activate_typebot()
{
Expand Down

0 comments on commit 5d3010d

Please sign in to comment.