How can I pass a variable wordpress shortcode
问题 I'm writing a Wordpress plugin which dynamically creates a string. I want to insert this string in a meta tag using the wp_head hook. My plugin works as follows: I define a shortcode whose handler function declares an add_action(... that adds a special <meta> tag into the header. This works, BUT... My only problem is that I can't figure out how to pass the variable containing the string to get printed into the head. The variable isn't defined, even though I globalize it in my plugin. //INSIDE