← All changes
|
includes/diagnostics/class-foreign-schema-detector.php
+10
-1
2.9.0
→
2.10.0
View file →
| @@ -483,9 +483,18 @@ | ||
| 483 | 483 | * @param string[] $types Type list. |
| 484 | 484 | * @return string[] |
| 485 | 485 | */ |
| 486 | 486 | private function page_level_only(array $types): array { |
| 487 | - return array_values(array_intersect($types, self::PAGE_LEVEL_TYPES)); | |
| 487 | + // Every LocalBusiness subtype is the same kind of entity for this | |
| 488 | + // purpose. ThinkRank publishes the subtype the site chose, so a | |
| 489 | + // "Dentist" of ours beside another plugin's "LocalBusiness" is still | |
| 490 | + // two businesses on one URL, and must still be reported as one. | |
| 491 | + $types = array_map( | |
| 492 | + static fn($type) => \ThinkRank\Config\Local_Business_Types_Config::is_local_business($type) ? 'LocalBusiness' : $type, | |
| 493 | + $types | |
| 494 | + ); | |
| 495 | + | |
| 496 | + return array_values(array_unique(array_intersect($types, self::PAGE_LEVEL_TYPES))); | |
| 488 | 497 | } |
| 489 | 498 | |
| 490 | 499 | /** |
| 491 | 500 | * The URL to scan. |