'break-word', 'background-color' => $data['background_color'], 'padding' => TemplateHelpers::get_spacing_value( isset( $data['padding'] ) ? $data['padding'] : [] ), ] ); $theme = [ 'Colorful' => 'colorful', 'LineDark' => 'line-dark', 'LineLight' => 'line-light', 'SolidDark' => 'solid-dark', 'SolidLight' => 'solid-light', ]; $is_custom_theme = isset( $data['theme'] ) && 'Custom' === $data['theme']; $icon_color = isset( $data['icon_color'] ) ? $data['icon_color'] : '#333333'; // Resolve global preset paths (presets/...) to hex BEFORE building the image URL. // Otherwise TemplateRenderer's post-pass replaces the path with "#rrggbb" inside the // query string, and the "#" truncates the URL as a fragment. $icon_color = TemplateHelpers::replace_color_paths( $icon_color ); $icon_size = isset( $data['width_icon'] ) ? absint( $data['width_icon'] ) : 24; $render_size = max( 32, min( 256, $icon_size * 2 ) ); // Handle table alignment $table_margin = '0 auto'; if ( isset( $data['align'] ) ) { switch ( $data['align'] ) { case 'center': $table_margin = '0 auto'; break; case 'right': $table_margin = '0 0 0 auto'; break; case 'left': default: $table_margin = '0'; break; } } $item_style = TemplateHelpers::get_style( [ 'display' => 'inline-block', 'vertical-align' => 'top', 'text-align' => 'center', 'margin' => '5px 0', 'padding-left' => TemplateHelpers::get_dimension_value( max( ( $data['spacing'] ?? 0 ) - 5, 0 ) / 2 ), 'padding-right' => TemplateHelpers::get_dimension_value( max( ( $data['spacing'] ?? 0 ) - 5, 0 ) / 2 ), 'padding-top' => 0, 'padding-bottom' => 0, ] ); $a_style = TemplateHelpers::get_style( [ 'display' => 'inline-block', 'border' => 'none', 'text-decoration' => 'none', ] ); ob_start(); ?>
| $el ) : ?> |