| @@ -1,12 +1,12 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * @package FirePlugins Framework |
| 4 | - * @version 1.0.16 | |
| 4 | + * @version 1.2.6 | |
| 5 | 5 | * |
| 6 | 6 | * @author FirePlugins <[email protected]> |
| 7 | 7 | * @link https://www.fireplugins.com |
| 8 | - * @copyright Copyright © 2021 FirePlugins All Rights Reserved | |
| 8 | + * @copyright Copyright © 2026 FirePlugins All Rights Reserved | |
| 9 | 9 | * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | if (!defined('ABSPATH')) |
| @@ -12,9 +12,12 @@ | ||
| 12 | 12 | if (!defined('ABSPATH')) |
| 13 | 13 | { |
| 14 | 14 | exit; // Exit if accessed directly. |
| 15 | 15 | } |
| 16 | -$class = !empty($this->data->get('class')) ? ' ' . implode(' ', $this->data->get('class')) : ''; | |
| 16 | +// "class" may be missing, an array, or a single class string. implode() throws a | |
| 17 | +// TypeError on anything but an array since PHP 8.0. | |
| 18 | +$class_list = \FPFramework\Helpers\FieldsHelper::toClassList($this->data->get('class')); | |
| 19 | +$class = $class_list ? ' ' . implode(' ', $class_list) : ''; | |
| 17 | 20 | $icon = $this->data->get('icon', ''); |
| 18 | 21 | $target = $this->data->get('target', ''); |
| 19 | 22 | $targetAtt = !empty($target) ? ' target="' . esc_attr($target) . '"' : ''; |
| 20 | 23 | ?> |