Last active
March 31, 2023 20:04
-
-
Save tallesairan/052fc521a49f840b34f71cddbbd57142 to your computer and use it in GitHub Desktop.
HrefLang correct language_attributes for global support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('language_attributes', function($language_attributes) { | |
$la = explode('-',$language_attributes); | |
if(!$la){ | |
return $language_attributes; | |
} | |
return $la[0].'"'; | |
} ) ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment