shortcodes = array( 'flowplayer', 'fvplayer', ); } } /** * Analyse a video shortcode from the plugin for usable video information * * @param string $full_shortcode Full shortcode as found in the post content. * @param string $sc Shortcode found. * @param array $atts Shortcode attributes - already decoded if needed. * @param string $content The shortcode content, i.e. the bit between [sc]content[/sc]. * * @return array An array with the usable information found or else an empty array */ public function get_info_from_shortcode( $full_shortcode, $sc, $atts = array(), $content = '' ) { $vid = array(); if ( isset( $atts['src'] ) && preg_match( '`\.(?:' . WPSEO_Video_Sitemap::$video_ext_pattern . ')$`', $atts['src'] ) ) { $vid['type'] = 'jwplayer'; // @todo is this really the correct type ? $vid['url'] = $atts['src']; $vid['content_loc'] = $atts['src']; $vid['maybe_local'] = true; if ( isset( $atts['splash'] ) && preg_match( '`\.(?:' . WPSEO_Video_Sitemap::$image_ext_pattern . ')$`', $atts['splash'] ) ) { $vid['thumbnail_loc'] = $atts['splash']; } $vid = $this->maybe_get_dimensions( $vid, $atts ); /* @todo - maybe implement ? would need post_id within this method $meta = get_post_meta( $post->ID, flowplayer::get_video_key( $meta_original ), true ); if ( $meta !== false && ! empty( $meta['duration'] ) ) { $vid['duration'] = $meta['duration']; } */ } return $vid; } } }