site_allowed_themes

FILTER wp-includes\class-wp-theme.php (ligne 1721) github
Filters the array of themes allowed on the site.

Paramètres

Entrée :
$allowed_themes[ $blog_id ], $blog_id
Sortie :
@param string[] $allowed_themes An array of theme stylesheet names.
@param int      $blog_id        ID of the site. Defaults to current site.

Utilisation

// Modifier la valeur avec le filtre 'site_allowed_themes'
add_filter('site_allowed_themes', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($allowed_themes[ $blog_id ]) {
    // Modifier la valeur
    return $allowed_themes[ $blog_id ];
}

Actualités

Chargement des actualités...