Version Description
- Enhancement: Added embedUrl property to VideoObject.
Download this release
Release Info
Developer | hishaman |
Plugin | Schema |
Version | 1.7.9.0 |
Comparing to | |
See all releases |
Code changes from version 1.7.8.9 to 1.7.9.0
- includes/extensions/video-object.php +15 -17
- readme.txt +4 -1
- schema.php +2 -2
includes/extensions/video-object.php
CHANGED
@@ -294,7 +294,7 @@ function schema_wp_video_object_output( $schema ) {
|
|
294 |
if (filter_var($provider, FILTER_VALIDATE_URL) != FALSE) {
|
295 |
$data = $autoembed->fetch( $provider, $url );
|
296 |
if (!empty($data) ) {
|
297 |
-
$schema['video'] = schema_wp_get_video_object_array( $data );
|
298 |
}
|
299 |
}
|
300 |
|
@@ -305,7 +305,7 @@ function schema_wp_video_object_output( $schema ) {
|
|
305 |
if (filter_var($provider, FILTER_VALIDATE_URL) != FALSE) {
|
306 |
$data = $autoembed->fetch( $provider, $url );
|
307 |
if (!empty($data) ) {
|
308 |
-
$schema['video'] = schema_wp_get_video_object_array( $data );
|
309 |
}
|
310 |
}
|
311 |
}*/
|
@@ -328,7 +328,7 @@ function schema_wp_video_object_output( $schema ) {
|
|
328 |
if (filter_var($provider, FILTER_VALIDATE_URL) != FALSE) {
|
329 |
$data = $autoembed->fetch( $provider, $url );
|
330 |
if (!empty($data) ) {
|
331 |
-
$schema['video'][] = schema_wp_get_video_object_array( $data );
|
332 |
}
|
333 |
}
|
334 |
}
|
@@ -357,15 +357,10 @@ function schema_wp_video_object_output( $schema ) {
|
|
357 |
* @since 1.5
|
358 |
* @return array
|
359 |
*/
|
360 |
-
function schema_wp_get_video_object_array( $data ) {
|
361 |
|
362 |
global $post;
|
363 |
|
364 |
-
// Check for WPRichSnippets
|
365 |
-
//if (function_exists('wprs_is_enabled')) {
|
366 |
-
// if ( wprs_is_enabled($post->ID) ) return;
|
367 |
-
//}
|
368 |
-
|
369 |
//print_r($data); exit;
|
370 |
|
371 |
$video_id = '';
|
@@ -396,13 +391,16 @@ function schema_wp_get_video_object_array( $data ) {
|
|
396 |
$duration = isset($data->duration) ? schema_wp_get_time_second_to_iso8601_duration( $data->duration ) : $meta_duration;
|
397 |
|
398 |
$schema = array(
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
|
|
|
|
|
|
407 |
return $schema;
|
408 |
}
|
294 |
if (filter_var($provider, FILTER_VALIDATE_URL) != FALSE) {
|
295 |
$data = $autoembed->fetch( $provider, $url );
|
296 |
if (!empty($data) ) {
|
297 |
+
$schema['video'] = schema_wp_get_video_object_array( $data, $url );
|
298 |
}
|
299 |
}
|
300 |
|
305 |
if (filter_var($provider, FILTER_VALIDATE_URL) != FALSE) {
|
306 |
$data = $autoembed->fetch( $provider, $url );
|
307 |
if (!empty($data) ) {
|
308 |
+
$schema['video'] = schema_wp_get_video_object_array( $data, $url );
|
309 |
}
|
310 |
}
|
311 |
}*/
|
328 |
if (filter_var($provider, FILTER_VALIDATE_URL) != FALSE) {
|
329 |
$data = $autoembed->fetch( $provider, $url );
|
330 |
if (!empty($data) ) {
|
331 |
+
$schema['video'][] = schema_wp_get_video_object_array( $data, $url );
|
332 |
}
|
333 |
}
|
334 |
}
|
357 |
* @since 1.5
|
358 |
* @return array
|
359 |
*/
|
360 |
+
function schema_wp_get_video_object_array( $data, $url ) {
|
361 |
|
362 |
global $post;
|
363 |
|
|
|
|
|
|
|
|
|
|
|
364 |
//print_r($data); exit;
|
365 |
|
366 |
$video_id = '';
|
391 |
$duration = isset($data->duration) ? schema_wp_get_time_second_to_iso8601_duration( $data->duration ) : $meta_duration;
|
392 |
|
393 |
$schema = array(
|
394 |
+
'@type' => 'VideoObject',
|
395 |
+
"name" => $name,
|
396 |
+
"description" => $description,
|
397 |
+
"thumbnailUrl" => $thumbnail_url,
|
398 |
+
'uploadDate' => $upload_date,
|
399 |
+
"duration" => $duration,
|
400 |
+
"embedUrl" => $url
|
401 |
+
);
|
402 |
+
|
403 |
+
//echo'<pre>'; print_r( $data ); echo'</pre>';
|
404 |
+
|
405 |
return $schema;
|
406 |
}
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: schema, schema.org, rich snippets, structured data, json-ld, json, google,
|
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.7
|
7 |
Requires PHP: 5.4
|
8 |
-
Stable tag: 1.7.
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -223,6 +223,9 @@ Yes, Schema plugin will detect AMP plugin and output a more complete and valid s
|
|
223 |
|
224 |
== Changelog ==
|
225 |
|
|
|
|
|
|
|
226 |
= 1.7.8.9 =
|
227 |
* Enhancement: Cache Knowledge Graph markup, reduced 3 database queries and enhanced performance.
|
228 |
* Update: Pumped tested WordPress version to 5.7 release.
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 5.7
|
7 |
Requires PHP: 5.4
|
8 |
+
Stable tag: 1.7.9.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
223 |
|
224 |
== Changelog ==
|
225 |
|
226 |
+
= 1.7.9.0 =
|
227 |
+
* Enhancement: Added embedUrl property to VideoObject.
|
228 |
+
|
229 |
= 1.7.8.9 =
|
230 |
* Enhancement: Cache Knowledge Graph markup, reduced 3 database queries and enhanced performance.
|
231 |
* Update: Pumped tested WordPress version to 5.7 release.
|
schema.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: The next generation of Structured Data.
|
6 |
* Author: Hesham
|
7 |
* Author URI: http://zebida.com
|
8 |
-
* Version: 1.7.
|
9 |
* Text Domain: schema-wp
|
10 |
* Domain Path: /languages
|
11 |
* License: GPLv2 or later
|
@@ -52,7 +52,7 @@ final class Schema_WP {
|
|
52 |
*
|
53 |
* @since 1.0
|
54 |
*/
|
55 |
-
private $version = '1.7.
|
56 |
|
57 |
/**
|
58 |
* The settings instance variable
|
5 |
* Description: The next generation of Structured Data.
|
6 |
* Author: Hesham
|
7 |
* Author URI: http://zebida.com
|
8 |
+
* Version: 1.7.9.0
|
9 |
* Text Domain: schema-wp
|
10 |
* Domain Path: /languages
|
11 |
* License: GPLv2 or later
|
52 |
*
|
53 |
* @since 1.0
|
54 |
*/
|
55 |
+
private $version = '1.7.9.0';
|
56 |
|
57 |
/**
|
58 |
* The settings instance variable
|