public
Created — forked from ramseyp/jwplayer_metabox.php

How do display JWPlayer shortcode from custom meta box

  • Download Gist
jwplayer_metabox.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12
<?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;
?>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.