Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Missing hfreflang attribute for content's own language #114

@Biont

Description

@Biont

In Mlp_Hreflang_Header_Output::wp_head() resp. Mlp_Hreflang_Header_Output::http_header()
only the available translations are searched - excluding the current base content.
That should be included, though :

If you have multiple language versions of a URL, each language page must identify all language
versions, including itself.  For example, if your site provides content in French, English, and Spanish,
the Spanish version must include a rel="alternate" hreflang="x" link for itself in addition to links to the
French and English versions. Similarly, the English and French versions must each include the same
references to the French, English, and Spanish versions.

https://support.google.com/webmasters/answer/189077?hl=en

So maybe Mlp_Hreflang_Header_Output::get_translations() should pass array( 'include_base' => TRUE ) when fetching the available translations:

$translations = $this->language_api->get_translations();

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions