Omschrijving
/**
* Forces the site locale for the HTML lang attribute from nl-NL to nl
*/
function modify_html_lang_attribute($output) {
// Replace 'nl_NL' with 'nl' in the language attributes
$output = str_replace('nl-NL', 'nl', $output);
return $output;
}
// Add the filter to 'language_attributes' hook
add_filter('language_attributes', 'modify_html_lang_attribute');