| @@ -86,8 +86,40 @@ | ||
| 86 | 86 | 'required' => ['@type', 'mainEntity'], |
| 87 | 87 | 'recommended' => ['about', 'author'], |
| 88 | 88 | 'optional' => ['name', 'description', 'url', 'dateModified'] |
| 89 | 89 | ], |
| 90 | + // The WebPage family. Schema_Builder has had a `case 'WebPage'` branch | |
| 91 | + // all along, but nothing here declared the type — so build_schema() | |
| 92 | + // rejected it before the switch was ever reached, and that branch was | |
| 93 | + // dead code. A customer asking for AboutPage and ContactPage is what | |
| 94 | + // surfaced it (#624). | |
| 95 | + // | |
| 96 | + // Only the four the output side can actually emit as themselves. | |
| 97 | + // ItemPage, QAPage and CollectionPage appear in | |
| 98 | + // Schema_Graph::PAGE_LEVEL_TYPES but have no branch in | |
| 99 | + // Global_SEO_Schema_Output::generate_schema(), so they fall to its | |
| 100 | + // `default` arm and publish plain WebPage — offering a type that | |
| 101 | + // silently emits a different one is worse than not offering it. | |
| 102 | + 'WebPage' => [ | |
| 103 | + 'required' => ['@type', 'name'], | |
| 104 | + 'recommended' => ['description', 'url', 'datePublished', 'dateModified'], | |
| 105 | + 'optional' => ['image', 'breadcrumb', 'primaryImageOfPage', 'about', 'mainEntity'] | |
| 106 | + ], | |
| 107 | + 'AboutPage' => [ | |
| 108 | + 'required' => ['@type', 'name'], | |
| 109 | + 'recommended' => ['description', 'url', 'datePublished', 'dateModified'], | |
| 110 | + 'optional' => ['image', 'breadcrumb', 'primaryImageOfPage', 'about', 'mainEntity'] | |
| 111 | + ], | |
| 112 | + 'ContactPage' => [ | |
| 113 | + 'required' => ['@type', 'name'], | |
| 114 | + 'recommended' => ['description', 'url', 'datePublished', 'dateModified'], | |
| 115 | + 'optional' => ['image', 'breadcrumb', 'primaryImageOfPage', 'about', 'mainEntity'] | |
| 116 | + ], | |
| 117 | + 'ProfilePage' => [ | |
| 118 | + 'required' => ['@type', 'name'], | |
| 119 | + 'recommended' => ['description', 'url', 'datePublished', 'dateModified'], | |
| 120 | + 'optional' => ['image', 'breadcrumb', 'primaryImageOfPage', 'about', 'mainEntity'] | |
| 121 | + ], | |
| 90 | 122 | 'LocalBusiness' => [ |
| 91 | 123 | 'required' => ['@type', 'name', 'address'], |
| 92 | 124 | 'recommended' => ['telephone', 'url', 'openingHours', 'geo', 'priceRange'], |
| 93 | 125 | 'optional' => ['description', 'logo', 'contactPoint', 'sameAs', 'paymentAccepted', 'currenciesAccepted'] |