Created
January 19, 2012 21:21
-
-
Save ramseyp/1642703 to your computer and use it in GitHub Desktop.
How do display JWPlayer shortcode from custom meta box
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
<?php | |
/* | |
* The JW Player plugin drops shortcode into the editor. It's not filtered through WordPress's do_shortcode(). | |
* You need to use jwplayer_tag_callback(). | |
*/ | |
global $post; | |
if (get_post_meta($post->ID, '_cmb_mini_wysiwyg', true) ): | |
$myvid = get_post_meta($post->ID, '_cmb_mini_wysiwyg', true); | |
$myvid = jwplayer_tag_callback( $myvid ); | |
echo $myvid; | |
endif; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment