diff --git a/apps/docs/docs/embed/wordpress.md b/apps/docs/docs/embed/wordpress.md index 620357051..2d54d4edd 100644 --- a/apps/docs/docs/embed/wordpress.md +++ b/apps/docs/docs/embed/wordpress.md @@ -12,6 +12,18 @@ Of course, before using it, you need to create and publish your first typebot. The code snippet to paste is easily configurable in the Share tab of your bot after clicking on the "Wordpress" button. +## Excluded pages + +The excluded pages input is a comma-separated list of pages where you don't want your typebot to appear. + +Examples: + +- `/app/*` will exclude all pages starting with `/app/` +- `/app` will only exclude the `/app` page +- `/app?param=1` will only exclude the `/app` page **and** with the `param` query parameter set to `1` +- `/app?param=*` will exclude the page at `/app` **and** with the `param` query parameter set to anything +- `/app/*?param=*` will exclude all pages starting with `/app/` **and** with the `param` query parameter set to anything + ## Personalize user experience You can leverage the [prefilled variables](/editor/variables#prefilled-variables) and inject your user information directly into your typebot so that the experience is entirely customized to your user. diff --git a/packages/embeds/wordpress/package.json b/packages/embeds/wordpress/package.json index 185b318f0..2b9e3d208 100644 --- a/packages/embeds/wordpress/package.json +++ b/packages/embeds/wordpress/package.json @@ -1,13 +1,13 @@ { "name": "@typebot.io/wordpress", - "version": "3.2.0", + "version": "3.3.0", "main": "index.js", "repository": "https://github.com/baptisteArno/typebot.io", "author": "baptisteArno", "license": "AGPL-3.0-or-later", "scripts": { "deploy": "pnpm copy && pnpm commit", - "copy": "svn copy ./trunk ./tags/3.2.0", - "commit": "svn ci -m 'Update embed lib to 0.1'" + "copy": "svn copy ./trunk ./tags/3.3.0", + "commit": "svn ci -m 'Fix loading issue with Gravity Forms'" } } diff --git a/packages/embeds/wordpress/trunk/README.txt b/packages/embeds/wordpress/trunk/README.txt index ef09dd07b..63bb1ac47 100644 --- a/packages/embeds/wordpress/trunk/README.txt +++ b/packages/embeds/wordpress/trunk/README.txt @@ -5,7 +5,7 @@ Requires at least: 5.0 Tested up to: 6.0 License: GPL 2.0 License URI: http://www.gnu.org/licenses/gpl-2.0.txt -Stable Tag: 3.2.0 +Stable Tag: 3.3.0 == Description == Collect 4x more responses with conversational apps using Typebot. @@ -24,6 +24,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 == += 3.3.0 = +* Fix loading with Gravity Forms and add query params exclusion + = 3.2.0 = * Update embed lib to 0.1 diff --git a/packages/embeds/wordpress/trunk/admin/partials/typebot-admin-display.php b/packages/embeds/wordpress/trunk/admin/partials/typebot-admin-display.php index 068eb32d6..7385c2ea0 100644 --- a/packages/embeds/wordpress/trunk/admin/partials/typebot-admin-display.php +++ b/packages/embeds/wordpress/trunk/admin/partials/typebot-admin-display.php @@ -16,7 +16,7 @@
-

Example: /app/*, /user/*, /admin/settings

+

Example: /app/*, /user/*, /admin/settings, /app?param=*

diff --git a/packages/embeds/wordpress/trunk/public/class-typebot-public.php b/packages/embeds/wordpress/trunk/public/class-typebot-public.php index bcecccadb..8a26e3216 100644 --- a/packages/embeds/wordpress/trunk/public/class-typebot-public.php +++ b/packages/embeds/wordpress/trunk/public/class-typebot-public.php @@ -1,78 +1,92 @@ + add_action('wp_head', array($this, 'parse_wp_user')); + add_action('wp_footer', array($this, 'typebot_script')); + } + + public function parse_wp_user() + { + $wp_user = wp_get_current_user(); + echo ''; + } + + public function add_head_code() + { + $this->parse_wp_user(); + } + + function typebot_script() + { + echo ''; } - add_action('wp_head', 'parse_wp_user'); - add_action('wp_footer', 'typebot_script'); + echo ''; } public function add_typebot_container($attributes = []) diff --git a/packages/embeds/wordpress/trunk/typebot.php b/packages/embeds/wordpress/trunk/typebot.php index 01be48db2..c6cc0765b 100644 --- a/packages/embeds/wordpress/trunk/typebot.php +++ b/packages/embeds/wordpress/trunk/typebot.php @@ -3,7 +3,7 @@ /** * Plugin Name: Typebot * Description: Convert more with conversational forms - * Version: 3.2.0 + * Version: 3.3.0 * Author: Typebot * Author URI: http://typebot.io/ * License: GPL-2.0+ @@ -16,7 +16,7 @@ if (!defined('WPINC')) { die(); } -define('TYPEBOT_VERSION', '3.2.0'); +define('TYPEBOT_VERSION', '3.3.0'); function activate_typebot() {