Thanks. Looks interesting.
Just to clarify further –
Then I would do something like
$popUpText = random_msg_func(” You got ” . $percent . ” percent”);
to set the value. And then I would trigger the popup somehow, which would include the shortcode [random_msg]
Not exactly sure how I would trigger the popup either. I’ve seen some that will trigger from a button but not from a function.