YouTube Embed - Version 2.6.1

Version Description

  • Bug: Fixed minimised script that adds editor button
  • Bug: Updated broken advert links
  • Bug: Fixed link in admin bar when using WP 3.1 - 3.3
  • Bug: Removed un-necessary cookie update that was causing errors in some situations
  • Maintenance: Updated WP 3.3+ admin bar options to correctly reflect permissions, naming and ordering of equivalent admin menu
Download this release

Release Info

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

Code changes from version 2.6 to 2.6.1

images/Thumbs.db DELETED
Binary file
includes/artiss-plugin-ads.php CHANGED
@@ -134,9 +134,9 @@ function artiss_fetch_ad_code( $ad_number ) {
134
 
135
  $sub_ad = rand( 1, 2 );
136
 
137
- if ( $sub_ad == 1 ) { $ad_code = '<a href="http://www.solostream.com/amember/go.php?r=7855&i=b0"><img src="http://www.solostream.com/images/solo-banner-125-1.gif" border=0 alt="Premium WordPress Themes" width=125 height=125></a>'; }
138
 
139
- if ( $sub_ad == 2 ) { $ad_code = '<a href="http://www.solostream.com/amember/go.php?r=7855&i=b1"><img src="http://www.solostream.com/images/solo-banner-125-2.gif" border=0 alt="Premium WordPress Themes" width=125 height=125></a>'; }
140
 
141
  }
142
 
@@ -146,9 +146,9 @@ function artiss_fetch_ad_code( $ad_number ) {
146
 
147
  $sub_ad = rand( 1, 2 );
148
 
149
- if ( $sub_ad == 1 ) { $ad_code = '<a href="https://managewp.com/?utm_source=A&utm_medium=Banner&utm_content=mwp_banner_4_125x125&utm_campaign=A&utm_mrl=52"><img src="https://managewp.com/banners/affiliate/mwp_banner_4_125x125.jpg /></a>'; }
150
 
151
- if ( $sub_ad == 2 ) { $ad_code = '<a href="https://managewp.com/?utm_source=A&utm_medium=Banner&utm_content=mwp_banner_5_125x125&utm_campaign=A&utm_mrl=52"><img src="https://managewp.com/banners/affiliate/mwp_banner_5_125x125.jpg /></a>'; }
152
 
153
  }
154
 
134
 
135
  $sub_ad = rand( 1, 2 );
136
 
137
+ if ( $sub_ad == 1 ) { $ad_code = '<a href="http://www.solostream.com/amember/go.php?r=7855&i=b0"><img src="http://www.solostream.com/images/solo-banner-125-1.gif" border=0 alt="Premium WordPress Themes" width=125 height=125 /></a>'; }
138
 
139
+ if ( $sub_ad == 2 ) { $ad_code = '<a href="http://www.solostream.com/amember/go.php?r=7855&i=b1"><img src="http://www.solostream.com/images/solo-banner-125-2.gif" border=0 alt="Premium WordPress Themes" width=125 height=125 /></a>'; }
140
 
141
  }
142
 
146
 
147
  $sub_ad = rand( 1, 2 );
148
 
149
+ if ( $sub_ad == 1 ) { $ad_code = '<a href="https://managewp.com/?utm_source=A&utm_medium=Banner&utm_content=mwp_banner_4_125x125&utm_campaign=A&utm_mrl=52"><img src="https://managewp.com/banners/affiliate/mwp_banner_4_125x125.jpg" /></a>'; }
150
 
151
+ if ( $sub_ad == 2 ) { $ad_code = '<a href="https://managewp.com/?utm_source=A&utm_medium=Banner&utm_content=mwp_banner_5_125x125&utm_campaign=A&utm_mrl=52"><img src="https://managewp.com/banners/affiliate/mwp_banner_5_125x125.jpg" /></a>'; }
152
 
153
  }
154
 
includes/aye-add-to-admin-bar.php CHANGED
@@ -23,7 +23,7 @@ function aye_admin_bar_render_3_1() {
23
 
24
  global $wp_version;
25
 
26
- if ( current_user_can( 'edit_plugins' ) && ( ( float ) $wp_version >= 3.1 ) && ( ( float ) $wp_version < 3.3 ) ) {
27
 
28
  $options = aye_set_general_defaults();
29
 
@@ -34,7 +34,7 @@ function aye_admin_bar_render_3_1() {
34
  'parent' => 'appearance',
35
  'id' => 'aye-options',
36
  'title' => __( 'YouTube Embed', 'youtube-embed' ),
37
- 'href' => admin_url( 'admin.php?page=youtube-embed-profiles' ),
38
  'meta' => false ) );
39
  }
40
  }
@@ -61,44 +61,55 @@ function aye_admin_bar_render_3_3( $meta = TRUE ) {
61
 
62
  $options = aye_set_general_defaults();
63
 
 
 
 
64
  if ( $options[ 'admin_bar' ] != '' ) {
65
 
66
  global $wp_admin_bar;
67
 
68
  if ( !is_user_logged_in() ) { return; }
69
- if ( !is_super_admin() || !is_admin_bar_showing() ) { return; }
70
 
71
  $wp_admin_bar -> add_menu( array(
72
  'id' => 'aye-menu',
73
  'title' => __( 'YouTube Embed', 'youtube-embed' ) ) );
74
 
75
- $wp_admin_bar -> add_menu( array(
76
- 'parent' => 'aye-menu',
77
- 'id' => 'aye-options',
78
- 'title' => __( 'Options', 'youtube-embed' ),
79
- 'href' => admin_url( 'admin.php?page=aye-general-options' ),
80
- 'meta' => array( 'target' => '_blank' ) ) );
81
-
82
- $wp_admin_bar -> add_menu( array(
83
- 'parent' => 'aye-menu',
84
- 'id' => 'aye-profile',
85
- 'title' => __( 'Profiles', 'youtube-embed' ),
86
- 'href' => admin_url( 'admin.php?page=aye-profile-options' ),
87
- 'meta' => array( 'target' => '_blank' ) ) );
88
-
89
- $wp_admin_bar -> add_menu( array(
90
- 'parent' => 'aye-menu',
91
- 'id' => 'aye-lists',
92
- 'title' => __( 'Lists', 'youtube-embed' ),
93
- 'href' => admin_url( 'admin.php?page=aye-list-options' ),
94
- 'meta' => array( 'target' => '_blank' ) ) );
95
-
96
- $wp_admin_bar -> add_menu( array(
97
- 'parent' => 'aye-menu',
98
- 'id' => 'aye-readme',
99
- 'title' => __( 'README', 'youtube-embed' ),
100
- 'href' => admin_url( 'admin.php?page=aye-support-readme' ),
101
- 'meta' => array( 'target' => '_blank' ) ) );
 
 
 
 
 
 
 
 
102
  }
103
  }
104
  }
23
 
24
  global $wp_version;
25
 
26
+ if ( current_user_can( 'delete_plugins' ) && ( ( float ) $wp_version >= 3.1 ) && ( ( float ) $wp_version < 3.3 ) ) {
27
 
28
  $options = aye_set_general_defaults();
29
 
34
  'parent' => 'appearance',
35
  'id' => 'aye-options',
36
  'title' => __( 'YouTube Embed', 'youtube-embed' ),
37
+ 'href' => admin_url( 'admin.php?page=aye-profile-options' ),
38
  'meta' => false ) );
39
  }
40
  }
61
 
62
  $options = aye_set_general_defaults();
63
 
64
+ $profile_access = $options[ 'profile_access' ];
65
+ $list_access = $options[ 'list_access' ];
66
+
67
  if ( $options[ 'admin_bar' ] != '' ) {
68
 
69
  global $wp_admin_bar;
70
 
71
  if ( !is_user_logged_in() ) { return; }
72
+ if ( !is_admin_bar_showing() ) { return; }
73
 
74
  $wp_admin_bar -> add_menu( array(
75
  'id' => 'aye-menu',
76
  'title' => __( 'YouTube Embed', 'youtube-embed' ) ) );
77
 
78
+ if ( function_exists( 'wp_readme_parser' ) ) {
79
+ $wp_admin_bar -> add_menu( array(
80
+ 'parent' => 'aye-menu',
81
+ 'id' => 'aye-readme',
82
+ 'title' => __( 'Instructions', 'youtube-embed' ),
83
+ 'href' => admin_url( 'admin.php?page=aye-support-instructions' ),
84
+ 'meta' => array( 'target' => '_blank' ) ) );
85
+ }
86
+
87
+ if ( current_user_can( 'delete_plugins' ) ) {
88
+ $wp_admin_bar -> add_menu( array(
89
+ 'parent' => 'aye-menu',
90
+ 'id' => 'aye-options',
91
+ 'title' => __( 'Options', 'youtube-embed' ),
92
+ 'href' => admin_url( 'admin.php?page=aye-general-options' ),
93
+ 'meta' => array( 'target' => '_blank' ) ) );
94
+ }
95
+
96
+ if ( current_user_can( $profile_access ) ) {
97
+ $wp_admin_bar -> add_menu( array(
98
+ 'parent' => 'aye-menu',
99
+ 'id' => 'aye-profile',
100
+ 'title' => __( 'Profiles', 'youtube-embed' ),
101
+ 'href' => admin_url( 'admin.php?page=aye-profile-options' ),
102
+ 'meta' => array( 'target' => '_blank' ) ) );
103
+ }
104
+
105
+ if ( current_user_can( $list_access ) ) {
106
+ $wp_admin_bar -> add_menu( array(
107
+ 'parent' => 'aye-menu',
108
+ 'id' => 'aye-lists',
109
+ 'title' => __( 'Lists', 'youtube-embed' ),
110
+ 'href' => admin_url( 'admin.php?page=aye-list-options' ),
111
+ 'meta' => array( 'target' => '_blank' ) ) );
112
+ }
113
  }
114
  }
115
  }
includes/aye-set-defaults.php CHANGED
@@ -80,13 +80,6 @@ function aye_set_editor_sc() {
80
 
81
  if ( $editor_sc == '' ) { update_option( 'youtube_embed_editor_sc', 'youtube' ); }
82
 
83
- // Ensure cookie is set
84
-
85
- $cookie_name = 'aye_mce_shortcode';
86
- $expiry = 2147483647; // January 2038 (maximum value to avoid the integer overflow of the 2038 bug)
87
-
88
- if ( !isset( $_COOKIE[ $cookie_name ] ) ) { setcookie( $cookie_name, $editor_sc, $expiry, aye_get_cookie_path() ); }
89
-
90
  // Return the shortcode
91
 
92
  return $editor_sc;
80
 
81
  if ( $editor_sc == '' ) { update_option( 'youtube_embed_editor_sc', 'youtube' ); }
82
 
 
 
 
 
 
 
 
83
  // Return the shortcode
84
 
85
  return $editor_sc;
js/aye-mce-button.min.php CHANGED
@@ -1 +1,3 @@
1
- (function(){<?php $cookie_name='aye_mce_shortcode';if(isset($_COOKIE[$cookie_name])){$shortcode=$_COOKIE[$cookie_name]}else{$shortcode='youtube'}?>var shortcode="<?php echo $shortcode; ?>";tinymce.create('tinymce.plugins.youtube',{init:function(ed,url){ed.addButton('YouTube',{title:'YouTube Embed',onclick:function(){if(ed.selection.getContent()==''){var yeOut='Insert video URL or ID here'}else{var yeOut=ed.selection.getContent()}ed.selection.setContent('['+shortcode+']'+yeOut+'[/'+shortcode+']')}})},createControl:function(n,cm){return null}});tinymce.PluginManager.add('YouTube',tinymce.plugins.youtube)})();
 
 
1
+ (function(){
2
+ <?php $cookie_name='aye_mce_shortcode'; if(isset($_COOKIE[$cookie_name])) {$shortcode=$_COOKIE[$cookie_name];} else {$shortcode='youtube';} ?>
3
+ var shortcode="<?php echo $shortcode; ?>";tinymce.create('tinymce.plugins.youtube',{init:function(ed,url){ed.addButton('YouTube',{title:'YouTube Embed',onclick:function(){if(ed.selection.getContent()==''){var yeOut='Insert video URL or ID here'}else{var yeOut=ed.selection.getContent()}ed.selection.setContent('['+shortcode+']'+yeOut+'[/'+shortcode+']')}})},createControl:function(n,cm){return null}});tinymce.PluginManager.add('YouTube',tinymce.plugins.youtube)})();
languages/youtube-embed.mo CHANGED
Binary file
languages/youtube-embed.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Artiss YouTube Embed\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-10-11 15:17-0000\n"
6
- "PO-Revision-Date: 2012-10-11 15:18-0000\n"
7
  "Last-Translator: David Artiss <david.artiss@artiss.co.uk>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -47,29 +47,30 @@ msgid "Follow Artiss.co.uk on RSS feed"
47
  msgstr ""
48
 
49
  #: includes/aye-add-to-admin-bar.php:36
50
- #: includes/aye-add-to-admin-bar.php:73
51
  msgid "YouTube Embed"
52
  msgstr ""
53
 
54
- #: includes/aye-add-to-admin-bar.php:78
 
 
 
 
 
55
  #: includes/aye-admin-config.php:119
56
  msgid "Options"
57
  msgstr ""
58
 
59
- #: includes/aye-add-to-admin-bar.php:85
60
  #: includes/aye-admin-config.php:129
61
  msgid "Profiles"
62
  msgstr ""
63
 
64
- #: includes/aye-add-to-admin-bar.php:92
65
  #: includes/aye-admin-config.php:139
66
  msgid "Lists"
67
  msgstr ""
68
 
69
- #: includes/aye-add-to-admin-bar.php:99
70
- msgid "README"
71
- msgstr ""
72
-
73
  #: includes/aye-admin-config.php:38
74
  msgid "Settings"
75
  msgstr ""
@@ -100,10 +101,6 @@ msgstr ""
100
  msgid "Artiss YouTube Embed Instructions"
101
  msgstr ""
102
 
103
- #: includes/aye-admin-config.php:112
104
- msgid "Instructions"
105
- msgstr ""
106
-
107
  #: includes/aye-admin-config.php:119
108
  msgid "Artiss YouTube Embed Options"
109
  msgstr ""
@@ -1240,7 +1237,7 @@ msgstr ""
1240
  msgid "Play one random video"
1241
  msgstr ""
1242
 
1243
- #: includes/aye-set-defaults.php:110
1244
  msgid "The video cannot be shown at the moment. Please try again later."
1245
  msgstr ""
1246
 
2
  msgstr ""
3
  "Project-Id-Version: Artiss YouTube Embed\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-10-12 15:39-0000\n"
6
+ "PO-Revision-Date: 2012-10-12 15:39-0000\n"
7
  "Last-Translator: David Artiss <david.artiss@artiss.co.uk>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
47
  msgstr ""
48
 
49
  #: includes/aye-add-to-admin-bar.php:36
50
+ #: includes/aye-add-to-admin-bar.php:76
51
  msgid "YouTube Embed"
52
  msgstr ""
53
 
54
+ #: includes/aye-add-to-admin-bar.php:82
55
+ #: includes/aye-admin-config.php:112
56
+ msgid "Instructions"
57
+ msgstr ""
58
+
59
+ #: includes/aye-add-to-admin-bar.php:91
60
  #: includes/aye-admin-config.php:119
61
  msgid "Options"
62
  msgstr ""
63
 
64
+ #: includes/aye-add-to-admin-bar.php:100
65
  #: includes/aye-admin-config.php:129
66
  msgid "Profiles"
67
  msgstr ""
68
 
69
+ #: includes/aye-add-to-admin-bar.php:109
70
  #: includes/aye-admin-config.php:139
71
  msgid "Lists"
72
  msgstr ""
73
 
 
 
 
 
74
  #: includes/aye-admin-config.php:38
75
  msgid "Settings"
76
  msgstr ""
101
  msgid "Artiss YouTube Embed Instructions"
102
  msgstr ""
103
 
 
 
 
 
104
  #: includes/aye-admin-config.php:119
105
  msgid "Artiss YouTube Embed Options"
106
  msgstr ""
1237
  msgid "Play one random video"
1238
  msgstr ""
1239
 
1240
+ #: includes/aye-set-defaults.php:103
1241
  msgid "The video cannot be shown at the moment. Please try again later."
1242
  msgstr ""
1243
 
readme.txt CHANGED
@@ -4,13 +4,13 @@ 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.4.2
7
- Stable tag: 2.6
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
 
11
  == Description ==
12
 
13
- **I'm looking at potentially removing some of the existing features to keep the plugin streamlined - please [vote](http://www.artiss.co.uk/youtube-embed/youtube-embed-features-vote "YouTube Embed Features Vote") on what you'd like me to keep and what you'd be happy for me to jetison!**
14
 
15
  Artiss YouTube Embed (formally YouTube Embed) is an incredibly simple, yet powerful, method of embedding YouTube videos into your WordPress site. Options include:
16
 
@@ -212,7 +212,7 @@ Artiss YouTube embed also has the ability to return a thumbnail of a video (sorr
212
 
213
  Use the function call `youtube_thumb_embed( 'id', 'paras', '', 'alt', 'nolink' )` to add a thumbnail to any part of your theme.
214
 
215
- Like the video embed equivalent, the `id` is the video ID and `alt` is the alternative text for the thumbnail image (optional). `nolink`, if set to `true`, will outout the thumbnail without a link to the YouTube video, allowing you to add your own.
216
 
217
  The parameters are different, however, but, again, are separated by ampersand.
218
 
@@ -314,7 +314,7 @@ For problems, suggestions or enhancements for this plugin, there is [a dedicated
314
 
315
  == Reviews & Mentions ==
316
 
317
- [Your Youtube Plugin is fantastic�it just saved my life on this site. Thank you!](https://twitter.com/AaronWatters/status/237957701605404672?uid=16257815&iid=am-130280753913455685118891763&nid=4+248 "Twitter - Aaron Watters") - Sonic Clamp.
318
 
319
  [New Technology Finds The Most Buzzed-About Parts Of Videos](http://www.socialtimes.com/2011/03/new-technology-finds-the-most-buzzed-about-parts-of-videos-interview/ "New Technology Finds The Most Buzzed-About Parts Of Videos") - SocialTimes.
320
 
@@ -444,6 +444,13 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
444
 
445
  == Changelog ==
446
 
 
 
 
 
 
 
 
447
  = 2.6 =
448
  * Bug: Fixed a bug that means videos have zero width on new installations until the default profile is updated (thanks to Aidan from [Noise Republic](http://www.noiserepublic.co.uk "Noise Republic") for reporting that)
449
  * Bug: Corrected URLs pointing to help screens at artiss.co.uk
@@ -664,8 +671,11 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
664
 
665
  == Upgrade Notice ==
666
 
 
 
 
667
  = 2.6 =
668
- * Updgrade to implement numerous bug fixes and enhancements
669
 
670
  = 2.5.6 =
671
  * Upgrade to fix critical bug for new installations
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.4.2
7
+ Stable tag: 2.6.1
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
 
11
  == Description ==
12
 
13
+ **I'm looking at potentially removing some of the existing features to keep the plugin streamlined - please [vote](http://www.artiss.co.uk/youtube-embed/youtube-embed-features-vote "YouTube Embed Features Vote") on what you'd like me to keep and what you'd be happy for me to jettison!**
14
 
15
  Artiss YouTube Embed (formally YouTube Embed) is an incredibly simple, yet powerful, method of embedding YouTube videos into your WordPress site. Options include:
16
 
212
 
213
  Use the function call `youtube_thumb_embed( 'id', 'paras', '', 'alt', 'nolink' )` to add a thumbnail to any part of your theme.
214
 
215
+ Like the video embed equivalent, the `id` is the video ID and `alt` is the alternative text for the thumbnail image (optional). `nolink`, if set to `true`, will output the thumbnail without a link to the YouTube video, allowing you to add your own.
216
 
217
  The parameters are different, however, but, again, are separated by ampersand.
218
 
314
 
315
  == Reviews & Mentions ==
316
 
317
+ [Your YouTube Plugin is fantastic�it just saved my life on this site. Thank you!](https://twitter.com/AaronWatters/status/237957701605404672?uid=16257815&iid=am-130280753913455685118891763&nid=4+248 "Twitter - Aaron Watters") - Sonic Clamp.
318
 
319
  [New Technology Finds The Most Buzzed-About Parts Of Videos](http://www.socialtimes.com/2011/03/new-technology-finds-the-most-buzzed-about-parts-of-videos-interview/ "New Technology Finds The Most Buzzed-About Parts Of Videos") - SocialTimes.
320
 
444
 
445
  == Changelog ==
446
 
447
+ = 2.6.1 =
448
+ * Bug: Fixed minimised script that adds editor button
449
+ * Bug: Updated broken advert links
450
+ * Bug: Fixed link in admin bar when using WP 3.1 - 3.3
451
+ * Bug: Removed un-necessary cookie update that was causing errors in some situations
452
+ * Maintenance: Updated WP 3.3+ admin bar options to correctly reflect permissions, naming and ordering of equivalent admin menu
453
+
454
  = 2.6 =
455
  * Bug: Fixed a bug that means videos have zero width on new installations until the default profile is updated (thanks to Aidan from [Noise Republic](http://www.noiserepublic.co.uk "Noise Republic") for reporting that)
456
  * Bug: Corrected URLs pointing to help screens at artiss.co.uk
671
 
672
  == Upgrade Notice ==
673
 
674
+ = 2.6.1 =
675
+ * Update to fix some bugs introduced in 2.6
676
+
677
  = 2.6 =
678
+ * Upgrade to implement numerous bug fixes and enhancements
679
 
680
  = 2.5.6 =
681
  * Upgrade to fix critical bug for new installations
youtube-embed.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Artiss YouTube Embed
4
  Plugin URI: http://www.artiss.co.uk/youtube-embed
5
  Description: Embed YouTube Videos in WordPress
6
- Version: 2.6
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.6' );
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/youtube-embed
5
  Description: Embed YouTube Videos in WordPress
6
+ Version: 2.6.1
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.6.1' );
21
 
22
  $functions_dir = WP_PLUGIN_DIR . '/youtube-embed/includes/';
23