"text-xs", "medium" => "text-base", ]; $font_size = array_key_exists($font, $font_sizes) ? $font_sizes[$font] : $font_sizes['medium']; # Paddings $paddings = ""; if ($font === "small" && $type !== "link") { $paddings = "px-4 py-[11px]"; } if ($font === "medium" && $type !== "link") { $paddings = "px-6 py-[14px]"; } # Icon $icon_position = isset($icon_name) ? $icon_position ?? "after" : false; $icon = [ "name" => $icon_name ?? false, "size" => $font, ]; # Classes $class = $class ?? ""; # Download $download = $download ?? ''; $allowed_protocols = null; if ( ! empty( $download ) ) { $allowed_protocols = wp_allowed_protocols(); if ( ! in_array( 'data', $allowed_protocols, true ) ) { $allowed_protocols[] = 'data'; } } $href = $url; ?> class="">