| @@ -1039,8 +1039,18 @@ | ||
| 1039 | 1039 | $data['url'] ?? '', |
| 1040 | 1040 | home_url() |
| 1041 | 1041 | ); |
| 1042 | 1042 | |
| 1043 | + // Both WebSite producers have to carry this or the deployed node and the | |
| 1044 | + // default one disagree about the same site — the shape of failure #688 | |
| 1045 | + // documents. The default node is generate_website_schema() (#692). | |
| 1046 | + $alternate_name = \ThinkRank\SEO\Site_Identity_Manager::alternate_name_for_schema( | |
| 1047 | + $data['site_data']['alternate_name'] ?? null | |
| 1048 | + ); | |
| 1049 | + if (null !== $alternate_name) { | |
| 1050 | + $schema['alternateName'] = $alternate_name; | |
| 1051 | + } | |
| 1052 | + | |
| 1043 | 1053 | // Recommended properties - prioritize user-configured Website schema description |
| 1044 | 1054 | if (!empty($data['site_data']['website_description'])) { |
| 1045 | 1055 | $schema['description'] = $this->truncate_text($data['site_data']['website_description'], 160); |
| 1046 | 1056 | } elseif (!empty($data['content'])) { |