After spending FOUR HOURS looking at this, I finally figured out what’s wrong.
I mean, I wrote test code after test code, thought there was something wrong with the PHP str_replace() function… Or that %% was now reserved in newer versions of PHP or something, so tried ,, instead of %% … on and on.
Anyway, I determined that if you use mixed case (for example %%myLink%% and %%myText%%) that it will not work. I was using %%tipContent%%. Because what was being passed to the Shortcoder function was not what you put into your post. %%tipContent%% becomes %%tipcontent%%. Not the same!!
Why? This portion from the WordPress Codex about the Shortcodes API:
IMPORTANT TIP – Don’t use camelCase or UPPER-CASE for your $atts attribute names
$atts values are lower-cased during shortcode_atts( array( ‘attr_1’ => ‘attr_1 default’, // …etc ), $atts ) processing, so you might want to just use lower-case.
So, use all lowercase. %%mylink%% and %%mytext%%. I’m surprised the developer used a mixed case parameter example right there on the shortcode editor page!!
Peace out. I have a headache now 🙄