shortcodes[] = 'lyte'; $this->alt_protocols = array( 'httpv://', 'httpa://', ); } } /** * Analyse a video shortcode from the plugin for usable video information * * Note: currently disregards playlist and audio shortcodes * * @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['id'] ) && $this->is_youtube_id( $atts['id'] ) ) { if ( ( ! isset( $atts['playlist'] ) || $atts['playlist'] != 'true' ) && ( ! isset( $atts['audio'] ) || $atts['audio'] != 'true' ) ) { $vid['type'] = 'youtube'; $vid['id'] = $atts['id']; } } return $vid; } } }