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

@ -227,7 +227,7 @@ class Typebot_Public
$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 @@ class Typebot_Public
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);