Skip to content

Run a filter before outputting the hreflang link#1039

Open
reekrd wants to merge 3 commits into
qtranslate:masterfrom
reekrd:hreflang-filter
Open

Run a filter before outputting the hreflang link#1039
reekrd wants to merge 3 commits into
qtranslate:masterfrom
reekrd:hreflang-filter

Conversation

@reekrd

@reekrd reekrd commented Jun 9, 2021

Copy link
Copy Markdown

This allows users to skip generating a hreflang link

@herrvigg herrvigg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made something similar temporarily in master but removed it until the question of the locales is better solved. I'd prefer a unique filter fired once instead of firing for every language.

@herrvigg herrvigg added core Core functionalities, including the admin section enhancement New feature or request labels Jun 12, 2021
@reekrd

reekrd commented Jun 13, 2021

Copy link
Copy Markdown
Author

Is it a better approach to run it between the two loops?

@herrvigg

Copy link
Copy Markdown
Collaborator

It could be done with an array indexed by lang, with url and locale. A filter could change/remove some items and QTX would only display what is left.

@herrvigg

Copy link
Copy Markdown
Collaborator

Ah, i only see the new version now. Yes, something like that, but I'd still need to clarifiy if we need a separation between lang and locale for the hreflang key.

@herrvigg herrvigg force-pushed the master branch 2 times, most recently from 660b9d6 to 2369434 Compare February 19, 2022 23:14
@herrvigg

Copy link
Copy Markdown
Collaborator

Sorry for long delay but it's related to a wider topic with #668 so I have to keep it on hold until this is addressed, lower priority at the moment. Patching the code locally is the only way for now, but I know this is not great 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core functionalities, including the admin section enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants