Version Description
- Enhancement: Compatibility with PHP 8 and above
Download this release
Release Info
| Developer | dartiss |
| Plugin | |
| Version | 5.2.3 |
| Comparing to | |
| See all releases | |
Code changes from version 5.2.2 to 5.2.3
- includes/generate-embed-code.php +10 -10
- readme.txt +7 -4
- youtube-embed.php +2 -2
includes/generate-embed-code.php
CHANGED
|
@@ -94,7 +94,7 @@ function ye_generate_youtube_code( $array ) {
|
|
| 94 |
$playlist_ids = '';
|
| 95 |
$embed_type = '';
|
| 96 |
|
| 97 |
-
if ( (
|
| 98 |
|
| 99 |
// Check if it's a list.
|
| 100 |
|
|
@@ -226,7 +226,7 @@ function ye_generate_youtube_code( $array ) {
|
|
| 226 |
|
| 227 |
if ( is_feed() ) {
|
| 228 |
$result = '';
|
| 229 |
-
if ( ( '' != $playlist_ids ) || (
|
| 230 |
$result .= '<p>' . __( 'A video list cannot be viewed within this feed - please view the original content', 'youtube-embed' ) . '.</p>' . $newline;
|
| 231 |
} else {
|
| 232 |
$youtube_url = 'https://www.youtube.com/watch?' . $embed_type . '=' . $id;
|
|
@@ -394,10 +394,10 @@ function ye_generate_youtube_code( $array ) {
|
|
| 394 |
if ( '' != $language ) {
|
| 395 |
$paras .= '&hl=' . $language;
|
| 396 |
}
|
| 397 |
-
if (
|
| 398 |
$paras .= '&start=' . $start;
|
| 399 |
}
|
| 400 |
-
if (
|
| 401 |
$paras .= '&end=' . $stop;
|
| 402 |
}
|
| 403 |
|
|
@@ -422,7 +422,7 @@ function ye_generate_youtube_code( $array ) {
|
|
| 422 |
$result .= ' ye-container';
|
| 423 |
}
|
| 424 |
$result .= '"';
|
| 425 |
-
if (
|
| 426 |
$result .= ' itemprop="video" itemscope itemtype="https://schema.org/VideoObject"';
|
| 427 |
}
|
| 428 |
$result .= '>' . $newline;
|
|
@@ -433,7 +433,7 @@ function ye_generate_youtube_code( $array ) {
|
|
| 433 |
|
| 434 |
// Add Metadata.
|
| 435 |
|
| 436 |
-
if (
|
| 437 |
|
| 438 |
if ( true === $api_data['restricted'] ) {
|
| 439 |
$friendly = 'false';
|
|
@@ -494,16 +494,16 @@ function ye_generate_youtube_code( $array ) {
|
|
| 494 |
|
| 495 |
// If a playlist, user or download build the ID appropriately.
|
| 496 |
|
| 497 |
-
if ( ( 'p' == $embed_type ) || (
|
| 498 |
|
| 499 |
$list_type = '';
|
| 500 |
if ( 'p' == $embed_type ) {
|
| 501 |
$list_type = 'playlist';
|
| 502 |
}
|
| 503 |
-
if (
|
| 504 |
$list_type = 'user_uploads';
|
| 505 |
}
|
| 506 |
-
if (
|
| 507 |
$list_type = 'search';
|
| 508 |
$id = urlencode( $id );
|
| 509 |
}
|
|
@@ -603,7 +603,7 @@ function ye_validate_profile( $name, $number ) {
|
|
| 603 |
// Loop around, fetching in profile names.
|
| 604 |
|
| 605 |
$loop = 1;
|
| 606 |
-
while ( ( $loop <= $number ) && (
|
| 607 |
if ( ( $name == $loop ) || ( 'Profile ' . $loop == $name ) ) {
|
| 608 |
$profile = $loop;
|
| 609 |
} else {
|
| 94 |
$playlist_ids = '';
|
| 95 |
$embed_type = '';
|
| 96 |
|
| 97 |
+
if ( ( 1 != $user ) && ( 1 != $search ) ) {
|
| 98 |
|
| 99 |
// Check if it's a list.
|
| 100 |
|
| 226 |
|
| 227 |
if ( is_feed() ) {
|
| 228 |
$result = '';
|
| 229 |
+
if ( ( '' != $playlist_ids ) || ( 1 == $user ) || ( 1 == $search ) ) {
|
| 230 |
$result .= '<p>' . __( 'A video list cannot be viewed within this feed - please view the original content', 'youtube-embed' ) . '.</p>' . $newline;
|
| 231 |
} else {
|
| 232 |
$youtube_url = 'https://www.youtube.com/watch?' . $embed_type . '=' . $id;
|
| 394 |
if ( '' != $language ) {
|
| 395 |
$paras .= '&hl=' . $language;
|
| 396 |
}
|
| 397 |
+
if ( 1 == $start ) {
|
| 398 |
$paras .= '&start=' . $start;
|
| 399 |
}
|
| 400 |
+
if ( 1 == $stop ) {
|
| 401 |
$paras .= '&end=' . $stop;
|
| 402 |
}
|
| 403 |
|
| 422 |
$result .= ' ye-container';
|
| 423 |
}
|
| 424 |
$result .= '"';
|
| 425 |
+
if ( 1 == $metadata ) {
|
| 426 |
$result .= ' itemprop="video" itemscope itemtype="https://schema.org/VideoObject"';
|
| 427 |
}
|
| 428 |
$result .= '>' . $newline;
|
| 433 |
|
| 434 |
// Add Metadata.
|
| 435 |
|
| 436 |
+
if ( 1 == $metadata ) {
|
| 437 |
|
| 438 |
if ( true === $api_data['restricted'] ) {
|
| 439 |
$friendly = 'false';
|
| 494 |
|
| 495 |
// If a playlist, user or download build the ID appropriately.
|
| 496 |
|
| 497 |
+
if ( ( 'p' == $embed_type ) || ( 1 == $user ) || ( 1 == $search ) ) {
|
| 498 |
|
| 499 |
$list_type = '';
|
| 500 |
if ( 'p' == $embed_type ) {
|
| 501 |
$list_type = 'playlist';
|
| 502 |
}
|
| 503 |
+
if ( 1 == $user ) {
|
| 504 |
$list_type = 'user_uploads';
|
| 505 |
}
|
| 506 |
+
if ( 1 == $search ) {
|
| 507 |
$list_type = 'search';
|
| 508 |
$id = urlencode( $id );
|
| 509 |
}
|
| 603 |
// Loop around, fetching in profile names.
|
| 604 |
|
| 605 |
$loop = 1;
|
| 606 |
+
while ( ( $loop <= $number ) && ( 1 != $profile ) ) {
|
| 607 |
if ( ( $name == $loop ) || ( 'Profile ' . $loop == $name ) ) {
|
| 608 |
$profile = $loop;
|
| 609 |
} else {
|
readme.txt
CHANGED
|
@@ -3,9 +3,9 @@ Contributors: dartiss
|
|
| 3 |
Donate link: https://artiss.blog/donate
|
| 4 |
Tags: embed, insert, video, youtube
|
| 5 |
Requires at least: 4.6
|
| 6 |
-
Tested up to:
|
| 7 |
Requires PHP: 5.3
|
| 8 |
-
Stable tag: 5.2.
|
| 9 |
License: GPLv2 or later
|
| 10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 11 |
|
|
@@ -328,6 +328,9 @@ Before reporting it please bear in mind that this plugin uses the standard YouTu
|
|
| 328 |
|
| 329 |
I use semantic versioning, with the first release being 1.0.
|
| 330 |
|
|
|
|
|
|
|
|
|
|
| 331 |
= 5.2.2 =
|
| 332 |
* Enhancement: A second attempt to fix that pesky vulnerability. Hopefully, all should now be well
|
| 333 |
|
|
@@ -569,5 +572,5 @@ I use semantic versioning, with the first release being 1.0.
|
|
| 569 |
|
| 570 |
== Upgrade Notice ==
|
| 571 |
|
| 572 |
-
= 5.2.
|
| 573 |
-
*
|
| 3 |
Donate link: https://artiss.blog/donate
|
| 4 |
Tags: embed, insert, video, youtube
|
| 5 |
Requires at least: 4.6
|
| 6 |
+
Tested up to: 6.0
|
| 7 |
Requires PHP: 5.3
|
| 8 |
+
Stable tag: 5.2.3
|
| 9 |
License: GPLv2 or later
|
| 10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 11 |
|
| 328 |
|
| 329 |
I use semantic versioning, with the first release being 1.0.
|
| 330 |
|
| 331 |
+
= 5.2.3 =
|
| 332 |
+
* Enhancement: Compatibility with PHP 8 and above
|
| 333 |
+
|
| 334 |
= 5.2.2 =
|
| 335 |
* Enhancement: A second attempt to fix that pesky vulnerability. Hopefully, all should now be well
|
| 336 |
|
| 572 |
|
| 573 |
== Upgrade Notice ==
|
| 574 |
|
| 575 |
+
= 5.2.3 =
|
| 576 |
+
* Compatibility with PHP 8 and above
|
youtube-embed.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: YouTube Embed
|
| 4 |
Plugin URI: https://github.com/dartiss/youtube-embed
|
| 5 |
Description: An incredibly fast, simple, yet powerful, method of embedding YouTube videos into your WordPress site.
|
| 6 |
-
Version: 5.2.
|
| 7 |
Author: dartiss
|
| 8 |
Author URI: https://artiss.blog
|
| 9 |
Text Domain: youtube-embed
|
|
@@ -11,7 +11,7 @@ Text Domain: youtube-embed
|
|
| 11 |
@package youtube-embed
|
| 12 |
*/
|
| 13 |
|
| 14 |
-
define( 'YOUTUBE_EMBED_VERSION', '5.2.
|
| 15 |
|
| 16 |
$functions_dir = plugin_dir_path( __FILE__ ) . 'includes/';
|
| 17 |
|
| 3 |
Plugin Name: YouTube Embed
|
| 4 |
Plugin URI: https://github.com/dartiss/youtube-embed
|
| 5 |
Description: An incredibly fast, simple, yet powerful, method of embedding YouTube videos into your WordPress site.
|
| 6 |
+
Version: 5.2.3
|
| 7 |
Author: dartiss
|
| 8 |
Author URI: https://artiss.blog
|
| 9 |
Text Domain: youtube-embed
|
| 11 |
@package youtube-embed
|
| 12 |
*/
|
| 13 |
|
| 14 |
+
define( 'YOUTUBE_EMBED_VERSION', '5.2.3' );
|
| 15 |
|
| 16 |
$functions_dir = plugin_dir_path( __FILE__ ) . 'includes/';
|
| 17 |
|
