| @@ -126,8 +126,40 @@ | ||
| 126 | 126 | 'Review' => [ |
| 127 | 127 | 'required_fields' => ['@type', 'itemReviewed', 'reviewRating', 'author'], |
| 128 | 128 | 'optional_fields' => ['reviewBody', 'datePublished', 'publisher', 'name', 'url'], |
| 129 | 129 | 'max_length' => ['name' => 110, 'reviewBody' => 500] |
| 130 | + ], | |
| 131 | + // The WebPage family. #624 made all four selectable in the metabox and | |
| 132 | + // taught the generate/validate/optimize/preview routes, Schema_Builder, | |
| 133 | + // Schema_Factory and Schema_Graph about them — but not this array, and | |
| 134 | + // deploy_schema_markup() gates every entry on it. So each one generated | |
| 135 | + // cleanly, validated at a score of 100, reported deployment_ready, then | |
| 136 | + // failed deployment with "Invalid schema type: AboutPage" and no row | |
| 137 | + // written. Exactly the #462 Review bug, one array and two releases | |
| 138 | + // later, which is why SchemaInputValidatorCoverageTest now scans the | |
| 139 | + // dropdown instead of trusting this list to be extended by hand. | |
| 140 | + // | |
| 141 | + // `name` and `url` are the two populate_webpage_schema() always sets; | |
| 142 | + // the rest are conditional, so they are optional here. | |
| 143 | + 'WebPage' => [ | |
| 144 | + 'required_fields' => ['@type', 'name', 'url'], | |
| 145 | + 'optional_fields' => ['description', 'datePublished', 'dateModified', 'isPartOf', 'breadcrumb', 'primaryImageOfPage', 'inLanguage', 'mainEntity'], | |
| 146 | + 'max_length' => ['name' => 110, 'description' => 160] | |
| 147 | + ], | |
| 148 | + 'AboutPage' => [ | |
| 149 | + 'required_fields' => ['@type', 'name', 'url'], | |
| 150 | + 'optional_fields' => ['description', 'datePublished', 'dateModified', 'isPartOf', 'breadcrumb', 'primaryImageOfPage', 'inLanguage', 'mainEntity'], | |
| 151 | + 'max_length' => ['name' => 110, 'description' => 160] | |
| 152 | + ], | |
| 153 | + 'ContactPage' => [ | |
| 154 | + 'required_fields' => ['@type', 'name', 'url'], | |
| 155 | + 'optional_fields' => ['description', 'datePublished', 'dateModified', 'isPartOf', 'breadcrumb', 'primaryImageOfPage', 'inLanguage', 'mainEntity'], | |
| 156 | + 'max_length' => ['name' => 110, 'description' => 160] | |
| 157 | + ], | |
| 158 | + 'ProfilePage' => [ | |
| 159 | + 'required_fields' => ['@type', 'name', 'url'], | |
| 160 | + 'optional_fields' => ['description', 'datePublished', 'dateModified', 'isPartOf', 'breadcrumb', 'primaryImageOfPage', 'inLanguage', 'mainEntity'], | |
| 161 | + 'max_length' => ['name' => 110, 'description' => 160] | |
| 130 | 162 | ] |
| 131 | 163 | ]; |
| 132 | 164 | |
| 133 | 165 | /** |