| @@ -6,20 +6,27 @@ | ||
| 6 | 6 | { |
| 7 | 7 | public function fluentSupportPortal($args) |
| 8 | 8 | { |
| 9 | 9 | if(isset($args['attributes'])) { |
| 10 | - $args['attributes'] = json_decode($args['attributes'], true); | |
| 10 | + $attributes_value = $args['attributes']; | |
| 11 | + $decoded = base64_decode($attributes_value, true); | |
| 12 | + if ($decoded !== false && json_decode($decoded) !== null) { | |
| 13 | + $args['attributes'] = json_decode($decoded, true); | |
| 14 | + } else { | |
| 15 | + $args['attributes'] = json_decode($attributes_value, true); | |
| 16 | + } | |
| 11 | 17 | } |
| 12 | 18 | |
| 13 | 19 | $args = shortcode_atts( array( |
| 14 | - 'show_logout' => 'no', | |
| 15 | - 'business_box_id' => $args['business_box_id'] ?? null, | |
| 16 | - 'attributes' => [], | |
| 20 | + 'show_logout' => 'no', | |
| 21 | + 'show-signup' => 'true', | |
| 22 | + 'show-reset-password' => 'true', | |
| 23 | + 'business_box_id' => $args['business_box_id'] ?? null, | |
| 24 | + 'attributes' => [], | |
| 17 | 25 | ), $args ); |
| 18 | 26 | |
| 19 | 27 | if ($args['attributes']) { |
| 20 | 28 | add_filter('fluent_support/customer_portal_vars', function ($vars) use($args) { |
| 21 | - | |
| 22 | 29 | $vars['attributes'] = $args['attributes']; |
| 23 | 30 | return $vars; |
| 24 | 31 | }); |
| 25 | 32 | } |
| @@ -25,9 +32,8 @@ | ||
| 25 | 32 | } |
| 26 | 33 | |
| 27 | 34 | if($args['show_logout'] == 'yes') { |
| 28 | 35 | add_filter('fluent_support/customer_portal_vars', function ($vars) { |
| 29 | - | |
| 30 | 36 | $vars['show_logout'] = true; |
| 31 | 37 | return $vars; |
| 32 | 38 | }); |
| 33 | 39 | } |