Filters the HTML link tag of an enqueued style.
Filtre la balise de lien HTML d'un style mis en file d'attente.
$tag, $handle, $href, $media
Sortie :
@param string $tag The link tag for the enqueued style. @param string $handle The style's registered handle. @param string $href The stylesheet's source URL. @param string $media The stylesheet's media attribute.
add_filter('style_loader_tag', 'add_style_attributes', 10, 4);
function add_style_attributes($tag, $handle, $href, $media) {
if ($handle === 'print-style') {
$tag = str_replace('media="all"', 'media="print"', $tag);
}
return $tag;
}
Chargement des actualités...