Version Description
- Maintenance: Now working with newer playlist IDs (README instructions chaneged to reflect how to do this)
- Maintenance: Resolved widget issues with version 4.3 of WordPress
- Maintenance: Eliminated XSS problem in admin profile screen
Download this release
Release Info
Developer | dartiss |
Plugin | YouTube Embed |
Version | 3.3.3 |
Comparing to | |
See all releases |
Code changes from version 3.3.2 to 3.3.3
- includes/generate-embed-code.php +5 -0
- includes/generate-widgets.php +3 -2
- includes/options-profiles.php +1 -1
- includes/shared-functions.php +8 -4
- readme.txt +23 -13
- youtube-embed.php +2 -2
includes/generate-embed-code.php
CHANGED
@@ -176,6 +176,11 @@ function vye_generate_youtube_code( $id = '', $type = '', $width = '', $height =
|
|
176 |
|
177 |
$metadata = $general[ 'metadata' ];
|
178 |
|
|
|
|
|
|
|
|
|
|
|
179 |
// Work out correct protocol to use - HTTP or HTTPS
|
180 |
|
181 |
if ( $https == '' ) { $https = $options[ 'https' ]; }
|
176 |
|
177 |
$metadata = $general[ 'metadata' ];
|
178 |
|
179 |
+
// Correct the ID if a playlist
|
180 |
+
if ( strtolower( substr( $id, 0, 2 ) ) == 'pl') {
|
181 |
+
$id = substr( $id, 2 );
|
182 |
+
}
|
183 |
+
|
184 |
// Work out correct protocol to use - HTTP or HTTPS
|
185 |
|
186 |
if ( $https == '' ) { $https = $options[ 'https' ]; }
|
includes/generate-widgets.php
CHANGED
@@ -19,8 +19,9 @@ class YouTubeEmbedWidget extends WP_Widget {
|
|
19 |
* @uses WP_Widget Standard WP_Widget class
|
20 |
*/
|
21 |
|
22 |
-
function
|
23 |
-
|
|
|
24 |
__( 'YouTube Embed', 'youtube-embed' ),
|
25 |
array( 'description' => __( 'Embed YouTube Widget.', 'youtube-embed' ), 'class' => 'my-widget-class' )
|
26 |
);
|
19 |
* @uses WP_Widget Standard WP_Widget class
|
20 |
*/
|
21 |
|
22 |
+
function __construct() {
|
23 |
+
|
24 |
+
parent::__construct( 'youtube_embed_widget',
|
25 |
__( 'YouTube Embed', 'youtube-embed' ),
|
26 |
array( 'description' => __( 'Embed YouTube Widget.', 'youtube-embed' ), 'class' => 'my-widget-class' )
|
27 |
);
|
includes/options-profiles.php
CHANGED
@@ -28,7 +28,7 @@ if ( $profile_no == '' ) { $profile_no = 0; }
|
|
28 |
|
29 |
if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-profile' , 'youtube_embed_profile_nonce' ) ) ) {
|
30 |
|
31 |
-
$options[ 'name' ] = $_POST[ 'youtube_embed_name' ];
|
32 |
$options[ 'type' ] = $_POST[ 'youtube_embed_type' ];
|
33 |
$options[ 'playlist' ] = $_POST[ 'youtube_embed_playlist' ];
|
34 |
$options[ 'width' ] = $_POST[ 'youtube_embed_width' ];
|
28 |
|
29 |
if ( ( !empty( $_POST[ 'Submit' ] ) ) && ( check_admin_referer( 'youtube-embed-profile' , 'youtube_embed_profile_nonce' ) ) ) {
|
30 |
|
31 |
+
$options[ 'name' ] = htmlentities( $_POST[ 'youtube_embed_name' ] );
|
32 |
$options[ 'type' ] = $_POST[ 'youtube_embed_type' ];
|
33 |
$options[ 'playlist' ] = $_POST[ 'youtube_embed_playlist' ];
|
34 |
$options[ 'width' ] = $_POST[ 'youtube_embed_width' ];
|
includes/shared-functions.php
CHANGED
@@ -201,11 +201,15 @@ function vye_validate_id( $id, $title_needed = false ) {
|
|
201 |
if ( !$cache ) {
|
202 |
|
203 |
$type = '';
|
204 |
-
if (
|
205 |
-
$type = '
|
206 |
} else {
|
207 |
-
if ( strlen( $id ) ==
|
208 |
-
$type = '
|
|
|
|
|
|
|
|
|
209 |
}
|
210 |
}
|
211 |
|
201 |
if ( !$cache ) {
|
202 |
|
203 |
$type = '';
|
204 |
+
if ( strtolower( substr( $id, 0, 2 ) ) == 'pl') {
|
205 |
+
$type = 'p';
|
206 |
} else {
|
207 |
+
if ( strlen( $id ) == 11 ) {
|
208 |
+
$type = 'v';
|
209 |
+
} else {
|
210 |
+
if ( strlen( $id ) == 16 ) {
|
211 |
+
$type = 'p';
|
212 |
+
}
|
213 |
}
|
214 |
}
|
215 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: dartiss
|
|
3 |
Donate link: http://artiss.co.uk/donate
|
4 |
Tags: annotations, artiss, chromecast, comments, download, embed, embedding, embedplus, flash, flv, hd, iframe, media, play, playlist, profile, responsive, seo, url, video, widget, youtube, youtuber
|
5 |
Requires at least: 3.9
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 3.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 |
|
@@ -27,22 +27,20 @@ YouTube Embed is an incredibly simple, yet powerful, method of embedding YouTube
|
|
27 |
* Works "out of the box" with 4K, 60FPS and Chromecast - stream your embedded videos to your TV!
|
28 |
* And much, much more!
|
29 |
|
30 |
-
There are no premium features and no adverts - this is 100% complete and free!
|
31 |
|
32 |
-
|
|
|
|
|
|
|
|
|
33 |
|
34 |
To add a video to a post or page simply use the shortcode `[youtube]video[/youtube]`, where `video` is the ID or URL of the video. Alternatively, you can add one (or more) widgets to your sidebar.
|
35 |
|
36 |
Within the administration area of your blog you will find a new menu named `YouTube` (see screenshot 1). Click on the `Options` sub-menu to set a number of general options. Alternatively click on the `Profiles` sub-menu to set the default options which define the output of your videos - any videos you display (unless overridden by parameters - more on that later) will use the settings from the Profiles screen.
|
37 |
|
38 |
-
The above should get you started - for more information and advanced options please read the "Other Notes" tab. This also includes details on how to migrate from another embedding plugin to YouTube Embed.
|
39 |
-
|
40 |
Although this document contains a lot of information more is available from a series of linked pages, plus as much information as possible is provided on the various administration pages. Whilst on the administration pages, click on the "Help" button in the top right for some useful tips and links. If anything isn't covered and you're unsure of what it does please ask [on the forum](https://wordpress.org/support/plugin/youtube-embed "WordPress Plugins Forum").
|
41 |
|
42 |
-
Not yet convinced? [See the feature comparison](https://spreadsheets.google.com/spreadsheet/pub?hl=en_GB&hl=en_GB&key=0AqxzQNe7e-NwdF80eUZuNjdtS1J1bWM4VERFVUN6ZHc&single=true&gid=4&output=html "YouTube Embed : Comparison") between this and the top 10 alternative plugins for embedding YouTube videos.
|
43 |
-
|
44 |
-
**For help with this plugin, or simply to comment or get in touch, please read the appropriate section in "Other Notes" for details. This plugin, and all support, is supplied for free, but [donations](http://artiss.co.uk/donate "Donate") are always welcome.**
|
45 |
-
|
46 |
== Advanced embedding options ==
|
47 |
|
48 |
A basic shortcode will embed your video using your default profile settings. However, you may wish to override some of these options on a video-by-video basis - this is done via parameters added to the shortcode.
|
@@ -128,10 +126,14 @@ And that's it! You can use unlimited widgets, so you can add different videos to
|
|
128 |
|
129 |
YouTube allows users to create their own playlists - collections of videos that can be played in sequence.
|
130 |
|
131 |
-
|
132 |
|
133 |
e.g. `[youtube]095393D5B42B2266[/youtube]`
|
134 |
|
|
|
|
|
|
|
|
|
135 |
Playlists cannot be used along with the EmbedPlus embedding method.
|
136 |
|
137 |
A better alternative to playlists is the build-in lists function in YouTube Embed - see the Lists section for further details.
|
@@ -481,8 +483,13 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
|
|
481 |
|
482 |
== Changelog ==
|
483 |
|
|
|
|
|
|
|
|
|
|
|
484 |
= 3.3.2 =
|
485 |
-
* Bug: One of the files was corrupt in the previous release - this
|
486 |
|
487 |
= 3.3.1 =
|
488 |
* Maintenance: Remove reference to Google API, as videos are now not displaying as a result of v2 being retired. Will update the plugin more fully in future release
|
@@ -769,11 +776,14 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
|
|
769 |
|
770 |
== Upgrade Notice ==
|
771 |
|
|
|
|
|
|
|
772 |
= 3.3.2 =
|
773 |
* An urgent fix to the urgent fix, due to a corrupt file
|
774 |
|
775 |
= 3.3.1 =
|
776 |
-
* Urgent fix to get videos displaying. Alternatively, switch off API in Options screen
|
777 |
|
778 |
= 3.3 =
|
779 |
* Update to fix assorted bugs and to remove the redundant Vixy branding
|
3 |
Donate link: http://artiss.co.uk/donate
|
4 |
Tags: annotations, artiss, chromecast, comments, download, embed, embedding, embedplus, flash, flv, hd, iframe, media, play, playlist, profile, responsive, seo, url, video, widget, youtube, youtuber
|
5 |
Requires at least: 3.9
|
6 |
+
Tested up to: 4.3
|
7 |
+
Stable tag: 3.3.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 |
|
27 |
* Works "out of the box" with 4K, 60FPS and Chromecast - stream your embedded videos to your TV!
|
28 |
* And much, much more!
|
29 |
|
30 |
+
There are no premium features and no adverts - this is 100% complete and free! It has all the features of other similar plugins - Smart YouTube, for instance. In fact if there's a feature in another YouTube embedding plugin that this doesn't have, let me know - I haven't come across it!
|
31 |
|
32 |
+
See the "Other Notes" tab for how to get started as well as the more advanced features. How easy is it to use? The fine people at [Webucator](https://www.webucator.com "Webucator") have put together an excellent video showing you how to get started with it..
|
33 |
+
|
34 |
+
https://www.youtube.com/watch?v=Wc7cvpQS-xQ
|
35 |
+
|
36 |
+
== Getting Started ==
|
37 |
|
38 |
To add a video to a post or page simply use the shortcode `[youtube]video[/youtube]`, where `video` is the ID or URL of the video. Alternatively, you can add one (or more) widgets to your sidebar.
|
39 |
|
40 |
Within the administration area of your blog you will find a new menu named `YouTube` (see screenshot 1). Click on the `Options` sub-menu to set a number of general options. Alternatively click on the `Profiles` sub-menu to set the default options which define the output of your videos - any videos you display (unless overridden by parameters - more on that later) will use the settings from the Profiles screen.
|
41 |
|
|
|
|
|
42 |
Although this document contains a lot of information more is available from a series of linked pages, plus as much information as possible is provided on the various administration pages. Whilst on the administration pages, click on the "Help" button in the top right for some useful tips and links. If anything isn't covered and you're unsure of what it does please ask [on the forum](https://wordpress.org/support/plugin/youtube-embed "WordPress Plugins Forum").
|
43 |
|
|
|
|
|
|
|
|
|
44 |
== Advanced embedding options ==
|
45 |
|
46 |
A basic shortcode will embed your video using your default profile settings. However, you may wish to override some of these options on a video-by-video basis - this is done via parameters added to the shortcode.
|
126 |
|
127 |
YouTube allows users to create their own playlists - collections of videos that can be played in sequence.
|
128 |
|
129 |
+
YouTube used to supply Playlist IDs as 16 digits and these can still be used...
|
130 |
|
131 |
e.g. `[youtube]095393D5B42B2266[/youtube]`
|
132 |
|
133 |
+
Alternatively, if you're using a newer, non-16 digit ID then append 'PL' to the beginning.
|
134 |
+
|
135 |
+
e.g. `[youtube]PLVTLbc6i-h_iuhdwUfuPDLFLXG2QQnz-x[/youtube]`
|
136 |
+
|
137 |
Playlists cannot be used along with the EmbedPlus embedding method.
|
138 |
|
139 |
A better alternative to playlists is the build-in lists function in YouTube Embed - see the Lists section for further details.
|
483 |
|
484 |
== Changelog ==
|
485 |
|
486 |
+
= 3.3.3 =
|
487 |
+
* Maintenance: Now working with newer playlist IDs (README instructions chaneged to reflect how to do this)
|
488 |
+
* Maintenance: Resolved widget issues with version 4.3 of WordPress
|
489 |
+
* Maintenance: Eliminated XSS problem in admin profile screen
|
490 |
+
|
491 |
= 3.3.2 =
|
492 |
+
* Bug: One of the files was corrupt in the previous release - this is now fixed. Sorry :(
|
493 |
|
494 |
= 3.3.1 =
|
495 |
* Maintenance: Remove reference to Google API, as videos are now not displaying as a result of v2 being retired. Will update the plugin more fully in future release
|
776 |
|
777 |
== Upgrade Notice ==
|
778 |
|
779 |
+
= 3.3.3 =
|
780 |
+
* Fix to resolve multiple urgent issues
|
781 |
+
|
782 |
= 3.3.2 =
|
783 |
* An urgent fix to the urgent fix, due to a corrupt file
|
784 |
|
785 |
= 3.3.1 =
|
786 |
+
* Urgent fix to get videos displaying. Alternatively, switch off API in Options screen
|
787 |
|
788 |
= 3.3 =
|
789 |
* Update to fix assorted bugs and to remove the redundant Vixy branding
|
youtube-embed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: YouTube Embed
|
4 |
Plugin URI: https://wordpress.org/plugins/youtube-embed/
|
5 |
Description: Embed YouTube Videos in WordPress
|
6 |
-
Version: 3.3.
|
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', '3.3.
|
21 |
|
22 |
$functions_dir = WP_PLUGIN_DIR . '/youtube-embed/includes/';
|
23 |
|
3 |
Plugin Name: YouTube Embed
|
4 |
Plugin URI: https://wordpress.org/plugins/youtube-embed/
|
5 |
Description: Embed YouTube Videos in WordPress
|
6 |
+
Version: 3.3.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', '3.3.3' );
|
21 |
|
22 |
$functions_dir = WP_PLUGIN_DIR . '/youtube-embed/includes/';
|
23 |
|