Skip to content

Instantly share code, notes, and snippets.

@saas786
Forked from ramseyp/jwplayer_metabox.php
Created April 17, 2012 06:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saas786/2404040 to your computer and use it in GitHub Desktop.
Save saas786/2404040 to your computer and use it in GitHub Desktop.
How do display JWPlayer shortcode from custom meta box
<?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