shortcodes[] = 'youtube'; /* * As the plugin doesn't offer a reliable version nr variable/constant, there's no way * to add these based on version. v3.8.1 introduced httpvhp */ $this->alt_protocols = array( 'httpv://', 'httpvh://', 'httpvhd://', // 'httpvp://', = playlist, not (yet) supported // 'httpvhp://', = HD playlist, not (yet) supported ); } } /** * Analyse a video shortcode from the plugin for usable video information * * {@internal This method is 100% the same as the YouTube one in JetPack, so made this an extending class.} * * @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 = parent::get_youtube_info( $full_shortcode, $sc, $atts, $content ); $vid['type'] = 'youtube'; return $vid; } } }