Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow x-default hreflang also if multiple alternate links are available #163

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

markusreis
Copy link

@markusreis markusreis commented Jan 7, 2021

Hey Dennis,

another filter request:

In your output code, the x-default only gets printed if there is only one alternate-link available. However, when for example offering two options alternate="de_DE" and alternate="en_US" you still might want to offer an x-default for all users from other countries. With this change you can then simply set the following to append the x-default link to the output for the desired default blog:

add_filter('mlsl_output_x_default_locale', function ($in) {
    return 'de_DE';
});

Will also solve this guys problem https://wordpress.org/support/topic/x-default-hreflang/ ;)

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants