So I have three variables $blue_tooltip_icon, $red_tooltip_icon and $gray_tooltip_icon. Now I want to output specific variables based on the attributes passed to the WordPress shortcode. So if you enter "blue", it's $blue_tooltip_icon; if you enter "red", it's $red_tooltip_icon; if you enter "gray", it's $gray_tooltip_icon.
The question is how to solve this problem. I tried using if statements but found that this is not possible in concatenation.
This is what I'm trying to output via the shortcode, the tooltip icon changes based on the color entered via the shortcode attribute.
$message = '<span data-title="'.$atts['text'].'" class="tooltip">'.$content .$blue_tooltip_icon.'</span>';
I think this will help you.