YouTube Embed - Version 2.5.3

Version Description

  • Bug: Fixed further issues with the widget code (thanks to Rose-Anne Constantineau for reporting it and helping me out test the result)
  • Maintenance: Improved some of the internationalisation texts
  • Maintenance: Neatened up some of the code output
Download this release

Release Info

Developer dartiss
Plugin Icon 128x128 YouTube Embed
Version 2.5.3
Comparing to
See all releases

Code changes from version 2.5.2 to 2.5.3

includes/aye-display-about.php CHANGED
@@ -15,7 +15,7 @@
15
 
16
  <p><?php echo sprintf( __( 'You are using Artiss YouTube Embed version %s. It was written by David Artiss.' ), youtube_embed_version ); ?></p>
17
 
18
- <a href="http://www.youtube.com/"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/poweredby.png" alt="Powered by YouTube" title="Powered by YouTube" align="right" /></a>
19
 
20
  <?php
21
 
15
 
16
  <p><?php echo sprintf( __( 'You are using Artiss YouTube Embed version %s. It was written by David Artiss.' ), youtube_embed_version ); ?></p>
17
 
18
+ <a href="http://www.youtube.com/"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/poweredby.png" alt="<?php _e( 'Powered by YouTube'); ?>" title="<?php _e( 'Powered by YouTube'); ?>" align="right" /></a>
19
 
20
  <?php
21
 
includes/aye-generate-embed-code.php CHANGED
@@ -368,7 +368,7 @@ function aye_generate_youtube_code( $id = '', $type = '', $width = '', $height =
368
 
369
  if ( $dynamic == 1) {
370
  $result = "<div class=\"ye-container\">\n";
371
- if ( $fixed == 1) { $result = '<div style="width: ' . $width . 'px; max-width: 100%">' . $result; }
372
  }
373
 
374
  // Add EmbedPlus code
@@ -464,10 +464,10 @@ function aye_generate_youtube_code( $id = '', $type = '', $width = '', $height =
464
 
465
  $end_tag = '';
466
  if ( $dynamic == 1 ) {
467
- $end_tag .= '</div>';
468
- if ( $fixed == 1 ) { $end_tag .= '</div>'; }
469
  }
470
- $result = str_replace( '%video%', $result . $end_tag . "\n", $template );
471
 
472
  // Now add a commented header and trailer
473
 
368
 
369
  if ( $dynamic == 1) {
370
  $result = "<div class=\"ye-container\">\n";
371
+ if ( $fixed == 1) { $result = '<div style="width: ' . $width . 'px; max-width: 100%">' . "\n" . $result; }
372
  }
373
 
374
  // Add EmbedPlus code
464
 
465
  $end_tag = '';
466
  if ( $dynamic == 1 ) {
467
+ $end_tag .= "</div>\n";
468
+ if ( $fixed == 1 ) { $end_tag .= "</div>\n"; }
469
  }
470
+ $result = str_replace( '%video%', $result . $end_tag, $template );
471
 
472
  // Now add a commented header and trailer
473
 
includes/aye-generate-thumbnail-code.php CHANGED
@@ -46,7 +46,7 @@ function aye_generate_thumbnail_code( $id, $style, $class, $rel, $target, $width
46
  if ( $version == 'end' ) { $version = 3; }
47
 
48
  // Now create the required code
49
- if ( $alt == '' ) { $alt = 'YouTube Video ' . $id; }
50
  $youtube_code = '<a href="http://www.youtube.com/watch?v=' . $id . '"';
51
  if ( $style != '' ) { $youtube_code .= ' style="' . $style . '"'; }
52
  if ( $class != '' ) { $youtube_code .= ' class="' . $class . '"'; }
46
  if ( $version == 'end' ) { $version = 3; }
47
 
48
  // Now create the required code
49
+ if ( $alt == '' ) { $alt = sprintf( __( 'YouTube Video %s' ), $id ); }
50
  $youtube_code = '<a href="http://www.youtube.com/watch?v=' . $id . '"';
51
  if ( $style != '' ) { $youtube_code .= ' style="' . $style . '"'; }
52
  if ( $class != '' ) { $youtube_code .= ' class="' . $class . '"'; }
includes/aye-generate-widgets.php CHANGED
@@ -51,6 +51,10 @@ class YouTubeEmbedWidget extends WP_Widget {
51
  // Output title, if one exists
52
  if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }
53
 
 
 
 
 
54
  // Generate the video and output it
55
  echo aye_generate_youtube_code ( $instance[ 'id' ],
56
  $instance[ 'type' ],
@@ -76,16 +80,15 @@ class YouTubeEmbedWidget extends WP_Widget {
76
  $instance[ 'profile' ],
77
  $instance[ 'list' ],
78
  '',
79
- $instance[ 'template' ],
80
- '',
81
  '',
82
  '',
83
  '',
84
  '',
85
- $instance[ 'video_title' ],
86
  $instance[ 'dynamic' ],
87
- $instance[ 'search' ],
88
- $instance[ 'user' ] );
89
 
90
  // Output the trailer
91
  echo $after_widget;
@@ -121,11 +124,10 @@ class YouTubeEmbedWidget extends WP_Widget {
121
  $instance[ 'list' ] = $new_instance[ 'list' ];
122
  $instance[ 'loop' ] = $new_instance[ 'loop' ];
123
  $instance[ 'stop' ] = $new_instance[ 'stop' ];
124
-
125
- if ( $new_instance[ 'id_type' ] == 's' ) { $instance[ 'search' ] = 1; } else { $instance[ 'search' ] = 0; }
126
- if ( $new_instance[ 'id_type' ] == 'u' ) { $instance[ 'user' ] = 1; } else { $instance[ 'user' ] = 0; }
127
 
128
  return $instance;
 
129
  }
130
 
131
  /**
51
  // Output title, if one exists
52
  if ( !empty( $title ) ) { echo $before_title . $title . $after_title; }
53
 
54
+ // Set the correct
55
+ if ( $instance[ 'id_type' ] == 's' ) { $search = 1; } else { $search = ''; }
56
+ if ( $instance[ 'id_type' ] == 'u' ) { $user = 1; } else { $user = ''; }
57
+
58
  // Generate the video and output it
59
  echo aye_generate_youtube_code ( $instance[ 'id' ],
60
  $instance[ 'type' ],
80
  $instance[ 'profile' ],
81
  $instance[ 'list' ],
82
  '',
83
+ $instance[ 'template' ], // Working fine
 
84
  '',
85
  '',
86
  '',
87
  '',
88
+ $instance[ 'video_title' ], // Gone wrong by this point
89
  $instance[ 'dynamic' ],
90
+ $search,
91
+ $user );
92
 
93
  // Output the trailer
94
  echo $after_widget;
124
  $instance[ 'list' ] = $new_instance[ 'list' ];
125
  $instance[ 'loop' ] = $new_instance[ 'loop' ];
126
  $instance[ 'stop' ] = $new_instance[ 'stop' ];
127
+ $instance[ 'id_type' ] = $new_instance[ 'id_type' ];
 
 
128
 
129
  return $instance;
130
+
131
  }
132
 
133
  /**
includes/aye-options-profiles.php CHANGED
@@ -21,10 +21,10 @@
21
  <h3>Follow Me</h3>
22
  <p>Please stay in touch with the latest news via one of the following social streams...</p>
23
  <p align="center">
24
- <a href="http://www.twitter.com/artiss_tech"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/Twitter.png" alt="Follow Artiss.co.uk on Twitter" title="Follow Artiss.co.uk on Twitter" style="margin-right: 20px;"></a>
25
- <a href="http://www.facebook.com/artiss.co.uk"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/Facebook.png" alt="Follow Artiss.co.uk on Facebook" title="Follow Artiss.co.uk on Facebook" style="margin-right: 20px;"></a>
26
- <a href="https://plus.google.com/108446415028687420620?rel=author"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/Google+.png" alt="Follow Artiss.co.uk on Google+" title="Follow Artiss.co.uk on Google+" style="margin-right: 20px;"></a>
27
- <a href="http://www.artiss.co.uk/feed"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/RSS.png" alt="Follow Artiss.co.uk on RSS feed" title="Follow Artiss.co.uk on RSS feed"></a>
28
  </p>
29
  </div><br/>
30
 
21
  <h3>Follow Me</h3>
22
  <p>Please stay in touch with the latest news via one of the following social streams...</p>
23
  <p align="center">
24
+ <a href="http://www.twitter.com/artiss_tech"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/Twitter.png" alt="<?php _e( 'Follow Artiss.co.uk on Twitter' ); ?>" title="<?php _e( 'Follow Artiss.co.uk on Twitter' ); ?>" style="margin-right: 20px;"></a>
25
+ <a href="http://www.facebook.com/artiss.co.uk"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/Facebook.png" alt="<?php _e( 'Follow Artiss.co.uk on Facebook' ); ?>" title="<?php _e( 'Follow Artiss.co.uk on Facebook' ); ?>" style="margin-right: 20px;"></a>
26
+ <a href="https://plus.google.com/108446415028687420620?rel=author"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/Google+.png" alt="<?php _e( 'Follow Artiss.co.uk on Google+' ); ?>" title="<?php _e( 'Follow Artiss.co.uk on Google+' ); ?>" style="margin-right: 20px;"></a>
27
+ <a href="http://www.artiss.co.uk/feed"><img src="<?php echo plugins_url(); ?>/youtube-embed/images/RSS.png" alt="<?php _e( 'Follow Artiss.co.uk on RSS feed' ); ?>" title="<?php _e( 'Follow Artiss.co.uk on RSS feed' ); ?>"></a>
28
  </p>
29
  </div><br/>
30
 
includes/aye-options-widgets.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // Set default options
4
 
5
- $default = array( 'titles' => 'YouTube', 'video_title' => '', 'id' => '', 'profile' => '', 'type' => '', 'template' => '', 'style' => '', 'start' => '', 'autoplay' => '', 'width' => '', 'height' => '', 'dynamic' => '', 'list' => '', 'loop' => '', 'stop' => '', 'id_type' => '' );
6
  $instance = wp_parse_args( ( array ) $instance, $default );
7
  $general = aye_set_general_defaults();
8
 
2
 
3
  // Set default options
4
 
5
+ $default = array( 'titles' => 'YouTube', 'video_title' => '', 'id' => '', 'profile' => '', 'type' => '', 'template' => '', 'style' => '', 'start' => '', 'autoplay' => '', 'width' => '', 'height' => '', 'dynamic' => '', 'list' => '', 'loop' => '', 'stop' => '', 'id_type' => 'v' );
6
  $instance = wp_parse_args( ( array ) $instance, $default );
7
  $general = aye_set_general_defaults();
8
 
languages/youtube-embed.mo CHANGED
Binary file
languages/youtube-embed.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Artiss Currency Converter\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-05-18 16:19-0000\n"
6
- "PO-Revision-Date: 2012-05-18 16:20-0000\n"
7
  "Last-Translator: David Artiss <david.artiss@artiss.co.uk>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -170,6 +170,10 @@ msgstr ""
170
  msgid "You are using Artiss YouTube Embed version %s. It was written by David Artiss."
171
  msgstr ""
172
 
 
 
 
 
173
  #: includes/aye-display-about.php:22
174
  msgid "Copyrights"
175
  msgstr ""
@@ -261,6 +265,11 @@ msgstr ""
261
  msgid "No video ID has been supplied"
262
  msgstr ""
263
 
 
 
 
 
 
264
  #: includes/aye-generate-widgets.php:25
265
  msgid "Embed YouTube Widget."
266
  msgstr ""
@@ -619,6 +628,22 @@ msgstr ""
619
  msgid "The video ID is invalid"
620
  msgstr ""
621
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
622
  #: includes/aye-options-profiles.php:98
623
  msgid " Profile Saved."
624
  msgstr ""
2
  msgstr ""
3
  "Project-Id-Version: Artiss Currency Converter\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-05-23 20:53-0000\n"
6
+ "PO-Revision-Date: 2012-05-23 20:53-0000\n"
7
  "Last-Translator: David Artiss <david.artiss@artiss.co.uk>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
170
  msgid "You are using Artiss YouTube Embed version %s. It was written by David Artiss."
171
  msgstr ""
172
 
173
+ #: includes/aye-display-about.php:18
174
+ msgid "Powered by YouTube"
175
+ msgstr ""
176
+
177
  #: includes/aye-display-about.php:22
178
  msgid "Copyrights"
179
  msgstr ""
265
  msgid "No video ID has been supplied"
266
  msgstr ""
267
 
268
+ #: includes/aye-generate-thumbnail-code.php:49
269
+ #, php-format
270
+ msgid "YouTube Video %s"
271
+ msgstr ""
272
+
273
  #: includes/aye-generate-widgets.php:25
274
  msgid "Embed YouTube Widget."
275
  msgstr ""
628
  msgid "The video ID is invalid"
629
  msgstr ""
630
 
631
+ #: includes/aye-options-profiles.php:24
632
+ msgid "Follow Artiss.co.uk on Twitter"
633
+ msgstr ""
634
+
635
+ #: includes/aye-options-profiles.php:25
636
+ msgid "Follow Artiss.co.uk on Facebook"
637
+ msgstr ""
638
+
639
+ #: includes/aye-options-profiles.php:26
640
+ msgid "Follow Artiss.co.uk on Google+"
641
+ msgstr ""
642
+
643
+ #: includes/aye-options-profiles.php:27
644
+ msgid "Follow Artiss.co.uk on RSS feed"
645
+ msgstr ""
646
+
647
  #: includes/aye-options-profiles.php:98
648
  msgid " Profile Saved."
649
  msgstr ""
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://artiss.co.uk/donate
4
  Tags: admin, annotations, artiss, automatic, editor, embed, embedding, embedplus, flash, flv, google, hd, height, iframe, manage, media, plugin, page, play, playlist, post, profile, responsive, search, sidebar, simple, smart, url, user, valid, video, widget, width, xhtml, youtube, youtuber
5
  Requires at least: 2.9
6
  Tested up to: 3.3.2
7
- Stable tag: 2.5.2
8
 
9
  A simple to use method of embedding YouTube videos into your posts and pages but with powerful features for those that need them.
10
 
@@ -431,6 +431,11 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
431
 
432
  == Changelog ==
433
 
 
 
 
 
 
434
  = 2.5.2 =
435
  * Bug: Fixed a bug where widgets weren't showing single videos (thanks to Josh Callaghan for reporting this)
436
 
@@ -601,4 +606,74 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
601
 
602
  == Upgrade Notice ==
603
 
604
- Upgrade if you use widgets to display videos
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  Tags: admin, annotations, artiss, automatic, editor, embed, embedding, embedplus, flash, flv, google, hd, height, iframe, manage, media, plugin, page, play, playlist, post, profile, responsive, search, sidebar, simple, smart, url, user, valid, video, widget, width, xhtml, youtube, youtuber
5
  Requires at least: 2.9
6
  Tested up to: 3.3.2
7
+ Stable tag: 2.5.3
8
 
9
  A simple to use method of embedding YouTube videos into your posts and pages but with powerful features for those that need them.
10
 
431
 
432
  == Changelog ==
433
 
434
+ = 2.5.3 =
435
+ * Bug: Fixed further issues with the widget code (thanks to Rose-Anne Constantineau for reporting it and helping me out test the result)
436
+ * Maintenance: Improved some of the internationalisation texts
437
+ * Maintenance: Neatened up some of the code output
438
+
439
  = 2.5.2 =
440
  * Bug: Fixed a bug where widgets weren't showing single videos (thanks to Josh Callaghan for reporting this)
441
 
606
 
607
  == Upgrade Notice ==
608
 
609
+ = 2.5.3 =
610
+ * Upgrade to fix issues with widgets
611
+
612
+ = 2.5.2 =
613
+ * Upgrade if you use widgets to display videos
614
+
615
+ = 2.5.1 =
616
+ * Upgrade if you are using a WordPress version before 3.3
617
+
618
+ = 2.5 =
619
+ * Upgrade to add a number of new features (including automatic generation of playlists based on user name or search term) and fix some bugs
620
+
621
+ = 2.4.1 =
622
+ * Upgrade to remove the dashboard widget
623
+
624
+ = 2.4 =
625
+ * Numerous improvements, including new option for responsive video output
626
+
627
+ = 2.3.1 =
628
+ * Upgrade to remove the sponsorship
629
+
630
+ = 2.3 =
631
+ * Assorted bug fixes and minor improvements. Also added Chromeless player.
632
+
633
+ = 2.2 =
634
+ * Assorted minor improvements
635
+
636
+ = 2.1 =
637
+ * New options to change player colours, chose your thumbnails and control API usage
638
+
639
+ = 2.0.4 =
640
+ * Fixed SSL bug by removing HTTPS access to API
641
+
642
+ = 2.0.3 =
643
+ * Removed secure API access as this was causing some users issues
644
+
645
+ = 2.0.2 =
646
+ * Further update to fix a few minor bugs found in 2.0. A few small enhancements have also been made
647
+
648
+ = 2.0.1 =
649
+ * Update to fix a few minor bugs found in 2.0 and add a couple of small enhancements
650
+
651
+ = 2.0 =
652
+ * Upgrade to take advantage of many new features. Code completely re-written
653
+
654
+ = 1.5 =
655
+ * Upgrade to add a number of new options including video size ratios, disabling keyboard controls, an editor button and different demonstration video options on the admin screen
656
+
657
+ = 1.4.2 =
658
+ * Upgrade is you upgraded to version 1.4 or 1.4.1 from a previous version, to fix an important bug
659
+
660
+ = 1.4.1 =
661
+ * Upgrade to make a small correction to the parameter lists
662
+
663
+ = 1.4 =
664
+ * Update to add EmbedPlus, multi-widgets and transcript output capabilities
665
+
666
+ = 1.3.1 =
667
+ * Update if you wish to change the widget heading
668
+
669
+ = 1.3 =
670
+ * Update if you find that the videos are covering up layers
671
+
672
+ = 1.2 =
673
+ * Update to ensure no warnings are reported by XHTML validators
674
+
675
+ = 1.1 =
676
+ * Update to get the test video on the options screen working again!
677
+
678
+ = 1.0 =
679
+ * Initial release
youtube-embed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Artiss YouTube Embed
4
  Plugin URI: http://www.artiss.co.uk/artiss-youtube-embed
5
  Description: Embed YouTube Videos in WordPress
6
- Version: 2.5.2
7
  Author: David Artiss
8
  Author URI: http://www.artiss.co.uk
9
  */
@@ -17,7 +17,7 @@ Author URI: http://www.artiss.co.uk
17
  * @since 2.0
18
  */
19
 
20
- define( 'youtube_embed_version', '2.5.2' );
21
 
22
  $functions_dir = WP_PLUGIN_DIR . '/youtube-embed/includes/';
23
 
3
  Plugin Name: Artiss YouTube Embed
4
  Plugin URI: http://www.artiss.co.uk/artiss-youtube-embed
5
  Description: Embed YouTube Videos in WordPress
6
+ Version: 2.5.3
7
  Author: David Artiss
8
  Author URI: http://www.artiss.co.uk
9
  */
17
  * @since 2.0
18
  */
19
 
20
+ define( 'youtube_embed_version', '2.5.3' );
21
 
22
  $functions_dir = WP_PLUGIN_DIR . '/youtube-embed/includes/';
23