Version Description
- Maintenance: Restricted access to Options and Profiles screen to administrators
- Bug: Fixed bug which caused errors to be generated on new installations of plugin
- Enhancement: Set a default width if the
content_widthglobal variable is set to zero
Download this release
Release Info
| Developer | dartiss |
| Plugin | |
| Version | 2.5.6 |
| Comparing to | |
| See all releases | |
Code changes from version 2.5.5 to 2.5.6
- includes/aye-admin-config.php +2 -2
- includes/aye-set-defaults.php +19 -6
- readme.txt +9 -1
- youtube-embed.php +2 -2
includes/aye-admin-config.php
CHANGED
|
@@ -85,7 +85,7 @@ function aye_menu_initialise() {
|
|
| 85 |
|
| 86 |
if ( $contextual_help == 'new' ) { global $aye_options_hook; }
|
| 87 |
|
| 88 |
-
$aye_options_hook = add_submenu_page( 'aye-general-options', __( 'Artiss YouTube Embed Options', 'youtube-embed' ), __( 'Options', 'youtube-embed' ), '
|
| 89 |
|
| 90 |
if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_options_hook, 'aye_add_options_help' ); }
|
| 91 |
|
|
@@ -95,7 +95,7 @@ function aye_menu_initialise() {
|
|
| 95 |
|
| 96 |
if ( $contextual_help == 'new' ) { global $aye_profiles_hook; }
|
| 97 |
|
| 98 |
-
$aye_profiles_hook = add_submenu_page( 'aye-general-options', __( 'Artiss YouTube Embed Profiles', 'youtube-embed' ), __( 'Profiles', 'youtube-embed' ), '
|
| 99 |
|
| 100 |
if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_profiles_hook, 'aye_add_profiles_help' ); }
|
| 101 |
|
| 85 |
|
| 86 |
if ( $contextual_help == 'new' ) { global $aye_options_hook; }
|
| 87 |
|
| 88 |
+
$aye_options_hook = add_submenu_page( 'aye-general-options', __( 'Artiss YouTube Embed Options', 'youtube-embed' ), __( 'Options', 'youtube-embed' ), 'activate_plugins', 'aye-general-options', 'aye_general_options' );
|
| 89 |
|
| 90 |
if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_options_hook, 'aye_add_options_help' ); }
|
| 91 |
|
| 95 |
|
| 96 |
if ( $contextual_help == 'new' ) { global $aye_profiles_hook; }
|
| 97 |
|
| 98 |
+
$aye_profiles_hook = add_submenu_page( 'aye-general-options', __( 'Artiss YouTube Embed Profiles', 'youtube-embed' ), __( 'Profiles', 'youtube-embed' ), 'activate_plugins', 'aye-profile-options', 'aye_profile_options' );
|
| 99 |
|
| 100 |
if ( $contextual_help == 'new' ) { add_action( 'load-' . $aye_profiles_hook, 'aye_add_profiles_help' ); }
|
| 101 |
|
includes/aye-set-defaults.php
CHANGED
|
@@ -64,6 +64,7 @@ function aye_set_url_option() {
|
|
| 64 |
*/
|
| 65 |
|
| 66 |
function aye_set_general_defaults() {
|
|
|
|
| 67 |
$options = get_option( 'youtube_embed_general' );
|
| 68 |
$changed = false;
|
| 69 |
$default_error = htmlspecialchars( '<p>' . __( 'The video cannot be shown at the moment. Please try again later.', 'youtube-embed' ) . '</p>' );
|
|
@@ -76,7 +77,9 @@ function aye_set_general_defaults() {
|
|
| 76 |
$options[ 'editor_button' ] = $old_opts[ 'youtube' ];
|
| 77 |
delete_option( 'youtube_embed_editor' );
|
| 78 |
$changed = true;
|
| 79 |
-
}
|
|
|
|
|
|
|
| 80 |
}
|
| 81 |
|
| 82 |
// Set current version level. Because this can be used to detect version changes (and to what extent), this information may be useful in future upgrades
|
|
@@ -87,6 +90,7 @@ function aye_set_general_defaults() {
|
|
| 87 |
}
|
| 88 |
|
| 89 |
// Because of upgrading, check each option - if not set, apply default
|
|
|
|
| 90 |
if ( !array_key_exists( 'donated', $options ) ) { $options[ 'donated' ] = ''; $changed = true; }
|
| 91 |
if ( !array_key_exists( 'editor_button', $options ) ) { $options[ 'editor_button' ] = 1; $changed = true; }
|
| 92 |
if ( !array_key_exists( 'admin_bar', $options ) ) { $options[ 'admin_bar' ] = 1; $changed = true; }
|
|
@@ -111,6 +115,7 @@ function aye_set_general_defaults() {
|
|
| 111 |
if ( !array_key_exists( 'frameborder', $options ) ) { $options[ 'frameborder' ] = 1; $changed = true; }
|
| 112 |
|
| 113 |
// Update the options, if changed, and return the result
|
|
|
|
| 114 |
if ( $changed ) { update_option( 'youtube_embed_general', $options ); }
|
| 115 |
return $options;
|
| 116 |
}
|
|
@@ -141,11 +146,9 @@ function aye_set_profile_defaults( $profile ) {
|
|
| 141 |
|
| 142 |
// Work out default dimensions
|
| 143 |
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
$width = 560;
|
| 148 |
-
}
|
| 149 |
$height = 27 + round( ( $width / 16 ) * 9, 0 );
|
| 150 |
|
| 151 |
// If the old options exist, import them and then delete them
|
|
@@ -156,6 +159,8 @@ function aye_set_profile_defaults( $profile ) {
|
|
| 156 |
$options = $old_opts;
|
| 157 |
delete_option( 'youtube_embed' );
|
| 158 |
$changed = true;
|
|
|
|
|
|
|
| 159 |
}
|
| 160 |
}
|
| 161 |
|
|
@@ -201,9 +206,11 @@ function aye_set_profile_defaults( $profile ) {
|
|
| 201 |
if ( !array_key_exists( 'fixed', $options ) ) { $options[ 'fixed' ] = ''; $changed = true; }
|
| 202 |
|
| 203 |
// Update the options, if changed, and return the result
|
|
|
|
| 204 |
if ( $changed ) { update_option( 'youtube_embed_profile' . $profile, $options ); }
|
| 205 |
|
| 206 |
// Remove added slashes from template XHTML
|
|
|
|
| 207 |
$options[ 'template' ] = stripslashes( $options[ 'template' ] );
|
| 208 |
|
| 209 |
return $options;
|
|
@@ -225,11 +232,17 @@ function aye_set_list_defaults( $list ) {
|
|
| 225 |
$options = get_option( 'youtube_embed_list' . $list );
|
| 226 |
$changed = false;
|
| 227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 228 |
// Because of upgrading, check each option - if not set, apply default
|
|
|
|
| 229 |
if ( !array_key_exists( 'name',$options ) ) { $options[ 'name' ] = 'List ' . $list; $changed = true; }
|
| 230 |
if ( !array_key_exists( 'list',$options ) ) { $options[ 'list' ] = ''; $changed = true; }
|
| 231 |
|
| 232 |
// Update the options, if changed, and return the result
|
|
|
|
| 233 |
if ( $changed ) { update_option( 'youtube_embed_list' . $list, $options ); }
|
| 234 |
return $options;
|
| 235 |
}
|
| 64 |
*/
|
| 65 |
|
| 66 |
function aye_set_general_defaults() {
|
| 67 |
+
|
| 68 |
$options = get_option( 'youtube_embed_general' );
|
| 69 |
$changed = false;
|
| 70 |
$default_error = htmlspecialchars( '<p>' . __( 'The video cannot be shown at the moment. Please try again later.', 'youtube-embed' ) . '</p>' );
|
| 77 |
$options[ 'editor_button' ] = $old_opts[ 'youtube' ];
|
| 78 |
delete_option( 'youtube_embed_editor' );
|
| 79 |
$changed = true;
|
| 80 |
+
} else {
|
| 81 |
+
$options = array();
|
| 82 |
+
}
|
| 83 |
}
|
| 84 |
|
| 85 |
// Set current version level. Because this can be used to detect version changes (and to what extent), this information may be useful in future upgrades
|
| 90 |
}
|
| 91 |
|
| 92 |
// Because of upgrading, check each option - if not set, apply default
|
| 93 |
+
|
| 94 |
if ( !array_key_exists( 'donated', $options ) ) { $options[ 'donated' ] = ''; $changed = true; }
|
| 95 |
if ( !array_key_exists( 'editor_button', $options ) ) { $options[ 'editor_button' ] = 1; $changed = true; }
|
| 96 |
if ( !array_key_exists( 'admin_bar', $options ) ) { $options[ 'admin_bar' ] = 1; $changed = true; }
|
| 115 |
if ( !array_key_exists( 'frameborder', $options ) ) { $options[ 'frameborder' ] = 1; $changed = true; }
|
| 116 |
|
| 117 |
// Update the options, if changed, and return the result
|
| 118 |
+
|
| 119 |
if ( $changed ) { update_option( 'youtube_embed_general', $options ); }
|
| 120 |
return $options;
|
| 121 |
}
|
| 146 |
|
| 147 |
// Work out default dimensions
|
| 148 |
|
| 149 |
+
$width = 0;
|
| 150 |
+
if ( isset( $GLOBALS[ 'content_width' ] ) ) { $width = $GLOBALS[ 'content_width' ]; }
|
| 151 |
+
if ( $width == 0 ) { $width = 560; }
|
|
|
|
|
|
|
| 152 |
$height = 27 + round( ( $width / 16 ) * 9, 0 );
|
| 153 |
|
| 154 |
// If the old options exist, import them and then delete them
|
| 159 |
$options = $old_opts;
|
| 160 |
delete_option( 'youtube_embed' );
|
| 161 |
$changed = true;
|
| 162 |
+
} else {
|
| 163 |
+
$options = array();
|
| 164 |
}
|
| 165 |
}
|
| 166 |
|
| 206 |
if ( !array_key_exists( 'fixed', $options ) ) { $options[ 'fixed' ] = ''; $changed = true; }
|
| 207 |
|
| 208 |
// Update the options, if changed, and return the result
|
| 209 |
+
|
| 210 |
if ( $changed ) { update_option( 'youtube_embed_profile' . $profile, $options ); }
|
| 211 |
|
| 212 |
// Remove added slashes from template XHTML
|
| 213 |
+
|
| 214 |
$options[ 'template' ] = stripslashes( $options[ 'template' ] );
|
| 215 |
|
| 216 |
return $options;
|
| 232 |
$options = get_option( 'youtube_embed_list' . $list );
|
| 233 |
$changed = false;
|
| 234 |
|
| 235 |
+
// If array doesn't exist create an empty one
|
| 236 |
+
|
| 237 |
+
if ( !is_array( $options ) ) { $options = array(); }
|
| 238 |
+
|
| 239 |
// Because of upgrading, check each option - if not set, apply default
|
| 240 |
+
|
| 241 |
if ( !array_key_exists( 'name',$options ) ) { $options[ 'name' ] = 'List ' . $list; $changed = true; }
|
| 242 |
if ( !array_key_exists( 'list',$options ) ) { $options[ 'list' ] = ''; $changed = true; }
|
| 243 |
|
| 244 |
// Update the options, if changed, and return the result
|
| 245 |
+
|
| 246 |
if ( $changed ) { update_option( 'youtube_embed_list' . $list, $options ); }
|
| 247 |
return $options;
|
| 248 |
}
|
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.4.1
|
| 7 |
-
Stable tag: 2.5.
|
| 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 |
|
|
@@ -432,6 +432,11 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
|
|
| 432 |
|
| 433 |
== Changelog ==
|
| 434 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 435 |
= 2.5.5 =
|
| 436 |
* Maintenance: Updated sponsorship - now includes option to switch off if user has donated
|
| 437 |
* Maintenance: Updated options screen to reflect the fact that the `related` and `color` parameters are now supported by the HTML5 player
|
|
@@ -622,6 +627,9 @@ Although I attempt to keep with PHP 4 compatibility there are no guarantees of t
|
|
| 622 |
|
| 623 |
== Upgrade Notice ==
|
| 624 |
|
|
|
|
|
|
|
|
|
|
| 625 |
= 2.5.5 =
|
| 626 |
* Upgrade for various bug fixes and maintenance updates
|
| 627 |
|
| 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.1
|
| 7 |
+
Stable tag: 2.5.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 |
|
| 432 |
|
| 433 |
== Changelog ==
|
| 434 |
|
| 435 |
+
= 2.5.6 =
|
| 436 |
+
* Maintenance: Restricted access to Options and Profiles screen to administrators
|
| 437 |
+
* Bug: Fixed bug which caused errors to be generated on new installations of plugin
|
| 438 |
+
* Enhancement: Set a default width if the `content_width` global variable is set to zero
|
| 439 |
+
|
| 440 |
= 2.5.5 =
|
| 441 |
* Maintenance: Updated sponsorship - now includes option to switch off if user has donated
|
| 442 |
* Maintenance: Updated options screen to reflect the fact that the `related` and `color` parameters are now supported by the HTML5 player
|
| 627 |
|
| 628 |
== Upgrade Notice ==
|
| 629 |
|
| 630 |
+
= 2.5.6 =
|
| 631 |
+
* Upgrade to fix critical bug for new installations
|
| 632 |
+
|
| 633 |
= 2.5.5 =
|
| 634 |
* Upgrade for various bug fixes and maintenance updates
|
| 635 |
|
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.
|
| 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.
|
| 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.6
|
| 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.6' );
|
| 21 |
|
| 22 |
$functions_dir = WP_PLUGIN_DIR . '/youtube-embed/includes/';
|
| 23 |
|
