Created
August 14, 2014 16:43
-
-
Save gmutschler/01e975250ac8a86ea683 to your computer and use it in GitHub Desktop.
Add a shortcode to tinymce that echoes bloginfo's values. (example: [bloginfo key='template_directory'])
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_bloginfo_shortcode( $atts ) { | |
extract(shortcode_atts(array( | |
'key' => '', | |
), $atts)); | |
return get_bloginfo($key); | |
} | |
add_shortcode('bloginfo', 'my_bloginfo_shortcode'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment