PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.10.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.10.0
2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 trunk 1.0.0 1.0.1 All 51 releases
← All changes | includes/seo/class-schema-validator.php +10 -1 1.29.0 → 2.10.0 View file →
@@ -80,9 +80,18 @@
80 80 return $validation;
81 81 }
82 82
83 83 $schema_type = $schema['@type'];
84 - $spec = $this->schema_factory->get_schema_specification($schema_type);
84 +
85 + // A LocalBusiness node carries the subtype the site chose ("Dentist"),
86 + // and none of the ~150 subtypes has a spec of its own. They all share
87 + // LocalBusiness's requirements, so validate against that rather than
88 + // reporting the site's own business type as unsupported.
89 + if (\ThinkRank\Config\Local_Business_Types_Config::is_local_business($schema_type)) {
90 + $schema_type = 'LocalBusiness';
91 + }
92 +
93 + $spec =$this->schema_factory->get_schema_specification($schema_type);
85 94
86 95 if (empty($spec)) {
87 96 $validation['errors'][] = "Unsupported schema type: {$schema_type}";
88 97 $validation['valid'] = false;