@@ -3,10 +3,10 @@ discard block |
||
3 | 3 | class YouTubeShortCodeHandler { |
4 | 4 | |
5 | 5 | // taken from http://www.ssbits.com/tutorials/2010/2-4-using-short-codes-to-embed-a-youtube-video/ and adapted for SS3 |
6 | - public static function parse_youtube( $arguments, $caption = null, $parser = null ) { |
|
6 | + public static function parse_youtube($arguments, $caption = null, $parser = null) { |
|
7 | 7 | // first things first, if we dont have a video ID, then we don't need to |
8 | 8 | // go any further |
9 | - if ( empty( $arguments['id'] ) ) { |
|
9 | + if (empty($arguments['id'])) { |
|
10 | 10 | return; |
11 | 11 | } |
12 | 12 | |
@@ -16,18 +16,18 @@ discard block |
||
16 | 16 | //play the video on page load |
17 | 17 | $customise['autoplay'] = false; |
18 | 18 | //set the caption |
19 | - $customise['caption'] = $caption ? Convert::raw2xml( $caption ) : false; |
|
19 | + $customise['caption'] = $caption ? Convert::raw2xml($caption) : false; |
|
20 | 20 | //set dimensions |
21 | 21 | $customise['width'] = 560; |
22 | 22 | $customise['height'] = 315; |
23 | 23 | |
24 | 24 | //overide the defaults with the arguments supplied |
25 | - $customise = array_merge( $customise, $arguments ); |
|
25 | + $customise = array_merge($customise, $arguments); |
|
26 | 26 | |
27 | 27 | //get our YouTube template |
28 | - $template = new SSViewer( 'YouTube' ); |
|
28 | + $template = new SSViewer('YouTube'); |
|
29 | 29 | |
30 | 30 | //return the customised template |
31 | - return $template->process( new ArrayData( $customise ) ); |
|
31 | + return $template->process(new ArrayData($customise)); |
|
32 | 32 | } |
33 | 33 | } |