/**
  * @param $output
  *
  * @since 4.3
  *
  * @return mixed|string
  */
 public function renderShortcodes($output)
 {
     $output = str_replace('][jwplayer', '] [jwplayer', $output);
     // fixes jwplayer shortcode regex..
     $data = JWP6_Shortcode::the_content_filter($output);
     preg_match_all('/(jwplayer-\\d+)/', $data, $matches);
     $pairs = array_unique($matches[0]);
     if (count($pairs) > 0) {
         $id_zero = time();
         foreach ($pairs as $pair) {
             $data = str_replace($pair, 'jwplayer-' . $id_zero++, $data);
         }
     }
     return $data;
 }
Esempio n. 2
0
function get_html5_video($video)
{
    if (class_exists('JWP6_Shortcode')) {
        echo JWP6_Shortcode::the_content_filter($video);
    }
}