Schema - Version 1.7.9.3

Version Description

  • Fixed: PHP notices to comply with PHP 8.0
  • Fixed: Check if class is loaded before calling it.
  • Fixed: Schema Markup Validator link in admin bar.
  • Update: Pumped tested WordPress version to 5.8.1 release.
  • Update: Modified readme.txt file.
Download this release

Release Info

Developer hishaman
Plugin Icon 128x128 Schema
Version 1.7.9.3
Comparing to
See all releases

Code changes from version 1.7.9.2 to 1.7.9.3

includes/admin/admin-bar-menu.php CHANGED
@@ -36,9 +36,9 @@ function schema_wp_admin_bar_menu_items( $admin_bar ) {
36
  $admin_bar->add_menu( array(
37
  'id' => 'schema-test-item',
38
  'title' => __('', 'schema-wp'),
39
- 'href' => 'https://developers.google.com/structured-data/testing-tool/?url='.$url,
40
  'meta' => array(
41
- 'title' => __('Structured Data Testing Tool', 'schema-wp'),
42
  'class' => 'schema_google_developers',
43
  'target' => __('_blank')
44
  ),
36
  $admin_bar->add_menu( array(
37
  'id' => 'schema-test-item',
38
  'title' => __('', 'schema-wp'),
39
+ 'href' => 'https://validator.schema.org/?url='.$url,
40
  'meta' => array(
41
+ 'title' => __('Schema Markup Validator', 'schema-wp'),
42
  'class' => 'schema_google_developers',
43
  'target' => __('_blank')
44
  ),
includes/admin/meta/class-meta.php CHANGED
@@ -402,7 +402,6 @@ function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = nu
402
 
403
  }
404
 
405
-
406
  /**
407
  * Finds any item in any level of an array
408
  *
@@ -439,7 +438,6 @@ function schema_wp_meta_box_find_field_type($keySearch, $array) {
439
  return false;
440
  }
441
 
442
-
443
  /**
444
  * Find repeatable
445
  *
@@ -454,7 +452,11 @@ function schema_wp_meta_box_find_field_type($keySearch, $array) {
454
  *
455
  * @return bool whether or not the type is in the provided array
456
  */
457
- function schema_wp_meta_box_find_repeatable( $needle = 'repeatable', $haystack ) {
 
 
 
 
458
  foreach ( $haystack as $h )
459
  if ( isset( $h['type'] ) && $h['type'] == $needle )
460
  return true;
@@ -475,7 +477,11 @@ function schema_wp_meta_box_find_repeatable( $needle = 'repeatable', $haystack )
475
  *
476
  * @return bool whether or not the type is in the provided array
477
  */
478
- function schema_wp_meta_box_find_repeatable_row( $needle = 'repeatable_row', $haystack ) {
 
 
 
 
479
  foreach ( $haystack as $h )
480
  if ( isset( $h['type'] ) && $h['type'] == $needle )
481
  return true;
402
 
403
  }
404
 
 
405
  /**
406
  * Finds any item in any level of an array
407
  *
438
  return false;
439
  }
440
 
 
441
  /**
442
  * Find repeatable
443
  *
452
  *
453
  * @return bool whether or not the type is in the provided array
454
  */
455
+ function schema_wp_meta_box_find_repeatable( $needle = 'repeatable', $haystack = array() ) {
456
+
457
+ if ( empty($haystack) )
458
+ return false;
459
+
460
  foreach ( $haystack as $h )
461
  if ( isset( $h['type'] ) && $h['type'] == $needle )
462
  return true;
477
  *
478
  * @return bool whether or not the type is in the provided array
479
  */
480
+ function schema_wp_meta_box_find_repeatable_row( $needle = 'repeatable_row', $haystack = array() ) {
481
+
482
+ if ( empty($haystack) )
483
+ return false;
484
+
485
  foreach ( $haystack as $h )
486
  if ( isset( $h['type'] ) && $h['type'] == $needle )
487
  return true;
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: hishaman, schemapress
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NGVUBT2QXN7YL
4
  Tags: schema, schema.org, rich snippets, structured data, json-ld, json, google, seo, markup, search engine, search, breadcrumbs, social, post, page, plugin, wordpress, content, article, news, search results, site name, knowledge graph, social, social profiles, keywords, meta-tags, metadata, tags, categories, optimize, ranking, search engine optimization, search engines, serp, sitelinks, google sitelinks, sitelinks search box, google sitelinks search box, semantic, structured, canonical, custom post types, post type, title, terms, media, images, thumb, featured, url, video, video markup, video object, VideoObject, video schema, audio object, AudioObject, audio schema, audio, sameAs, about, contact, amp, mobile, taxonomy
5
  Requires at least: 4.0
6
- Tested up to: 5.7.2
7
  Requires PHP: 5.4
8
- Stable tag: 1.7.9.2
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -29,6 +29,7 @@ Schema markup is code (semantic vocabulary) that you put on your website to help
29
  ### Schema.org Structured Data Demo & Examples
30
 
31
  * View our [Live Structured Data Demo](https://demo.schema.reviews/) examples site.
 
32
  * View [WordPress Grade](https://wpgrade.com/) site.
33
 
34
  ### Schema Key Features
@@ -224,6 +225,13 @@ Yes, Schema plugin will detect AMP plugin and output a more complete and valid s
224
 
225
  == Changelog ==
226
 
 
 
 
 
 
 
 
227
  = 1.7.9.2 =
228
  * Update: Pumped tested WordPress version to 5.7.2 release.
229
  * Update: Modified readme.txt file.
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NGVUBT2QXN7YL
4
  Tags: schema, schema.org, rich snippets, structured data, json-ld, json, google, seo, markup, search engine, search, breadcrumbs, social, post, page, plugin, wordpress, content, article, news, search results, site name, knowledge graph, social, social profiles, keywords, meta-tags, metadata, tags, categories, optimize, ranking, search engine optimization, search engines, serp, sitelinks, google sitelinks, sitelinks search box, google sitelinks search box, semantic, structured, canonical, custom post types, post type, title, terms, media, images, thumb, featured, url, video, video markup, video object, VideoObject, video schema, audio object, AudioObject, audio schema, audio, sameAs, about, contact, amp, mobile, taxonomy
5
  Requires at least: 4.0
6
+ Tested up to: 5.8.1
7
  Requires PHP: 5.4
8
+ Stable tag: 1.7.9.3
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
29
  ### Schema.org Structured Data Demo & Examples
30
 
31
  * View our [Live Structured Data Demo](https://demo.schema.reviews/) examples site.
32
+
33
  * View [WordPress Grade](https://wpgrade.com/) site.
34
 
35
  ### Schema Key Features
225
 
226
  == Changelog ==
227
 
228
+ = 1.7.9.3 =
229
+ * Fixed: PHP notices to comply with PHP 8.0
230
+ * Fixed: Check if class is loaded before calling it.
231
+ * Fixed: Schema Markup Validator link in admin bar.
232
+ * Update: Pumped tested WordPress version to 5.8.1 release.
233
+ * Update: Modified readme.txt file.
234
+
235
  = 1.7.9.2 =
236
  * Update: Pumped tested WordPress version to 5.7.2 release.
237
  * Update: Modified readme.txt file.
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.2
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.9.2';
56
 
57
  /**
58
  * The settings instance variable
@@ -282,7 +282,7 @@ final class Schema_WP {
282
  * @return void
283
  */
284
  function init_classes() {
285
- if ( is_admin() ) {
286
  new Schema_WP_Setup_Wizard();
287
  }
288
  }
5
  * Description: The next generation of Structured Data.
6
  * Author: Hesham
7
  * Author URI: http://zebida.com
8
+ * Version: 1.7.9.3
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.3';
56
 
57
  /**
58
  * The settings instance variable
282
  * @return void
283
  */
284
  function init_classes() {
285
+ if ( is_admin() && class_exists( 'Schema_WP_Setup_Wizard' ) ) {
286
  new Schema_WP_Setup_Wizard();
287
  }
288
  }