Dennis Ploetner
Forum Replies Created
-
For the question that started the thread: MSLS will add “alternate” links for the “hreflang” in the header. As an example, the output at https://msls.co/:
<link rel="alternate" hreflang="de" href="https://msls.co/de/" title="Deutsch" />
<link rel="alternate" hreflang="en" href="https://msls.co/" title="English" />You can customize the outcome by using filter-hooks:
For a single result with no translation
add_filter( 'mlsl_output_get_alternate_links_default', function( string $default ) {
// your code here
return $default;
}Β );For an array of contents including the current content
add_filter( 'mlsl_output_get_alternate_links_arr', function ( array $arr ) {
// your code here
return $arr;
}Β );Forum: Plugins
In reply to: [Multisite Language Switcher] Hreflang tag issuesHey, thanks for the message. Can you elaborate a bit what you’d like to achieve?
Forum: Plugins
In reply to: [Multisite Language Switcher] New Japanese Posts Overwriting Previous PostsI would need more information. How is your setup, which version uses it? How are the languages set?
Forum: Plugins
In reply to: [Multisite Language Switcher] Wrong links for Archive pages and Custom SlugsThanks a lot!
Forum: Plugins
In reply to: [Multisite Language Switcher] Hreflang Missing Return LinksI’m not sure that I get the problem correctly. The code generated by MSLS in the HTML header is wrong or incomplete? Any suggestions how I can/should improve the output?
Forum: Plugins
In reply to: [Multisite Language Switcher] Languages invisble on main siteIt should also show admins. The filter
msls_get_userscan be used to change the user-query: https://msls.co/developer-docs/hook-reference/Forum: Plugins
In reply to: [Multisite Language Switcher] Too much escapingI believe that this issue should be solved with the last version. Thanks for pointing it out!
Forum: Plugins
In reply to: [Multisite Language Switcher] Wrong links for Archive pages and Custom SlugsHey, let’s have proper issue tracking on GitHub: https://github.com/lloc/Multisite-Language-Switcher
I will clean there a bit up in the next days, but the plan is, to use the infrastructure there to manage the requests that will lead to code changes even better.Forum: Reviews
In reply to: [Multisite Language Switcher] Such a useful plugin, and top-rate supportThank you! π
Forum: Plugins
In reply to: [Multisite Language Switcher] Incorrect class for Welsh flagI see. I will, right away, correct it and send a new version online. Thanks!
Happy, you like it! π
Forum: Plugins
In reply to: [Multisite Language Switcher] Wrong links for Archive pages and Custom SlugsI will check this again, but there is also a workaround for cases where the switcher just fails. There is a hook named
msls_options_get_permalink. Read on here: https://msls.co/developer-docs/hook-reference/Forum: Plugins
In reply to: [Multisite Language Switcher] Incorrect class for Welsh flagHey, thanks for your message. I just looked the language code up, and it seems that
cywould be the correct code for Welsh: https://translate.wordpress.org/locale/cy/Is your language code somehow set to
gb_WLS? The flags.php file is autogenerated. It uses input from the core and applies the exceptions from one of my build scripts.Thanks for pointing this out. I will look into this and try to reproduce it. In the meanwhile, you could use the labels instead of flags in the WordPress admin, which might be more accurate.
Forum: Plugins
In reply to: [Multisite Language Switcher] Href Lang Tag issueThe title might not be needed, but is an excepted attribute: https://www.w3schools.com/tags/tag_link.asp
You could use the ‘mlsl_output_get_alternate_links_arr’ to clean it, but I don’t think it is worth it. You may make a feature request, if you still believe, that an additional filter is needed: https://github.com/lloc/Multisite-Language-Switcher/issues