Skip to content

Instantly share code, notes, and snippets.

@ramseyp
Created January 19, 2012 21:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ramseyp/1642703 to your computer and use it in GitHub Desktop.
Save ramseyp/1642703 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