site_allowed_themes WordPress Filter Hook

The site_allowed_themes filter hook allows you to add or remove themes from the allowed themes list. This can be useful if you want to prevent a certain theme from being used on your site.

apply_filters( 'site_allowed_themes', string[] $allowed_themes, int $blog_id ) #

Filters the array of themes allowed on the site.


Parameters

$allowed_themes

(string[])An array of theme stylesheet names.

$blog_id

(int)ID of the site. Defaults to current site.


Top ↑

Source

File: wp-includes/class-wp-theme.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.