allowed_themes WordPress Filter Hook

The allowed_themes filter hook is used to change the array of theme names allowed on the site. This can be useful for a number of reasons, such as preventing certain themes from being activated or only allowing certain themes to be activated.

apply_filters( 'allowed_themes', string[] $allowed_themes ) #

Filters the array of themes allowed on the network.


Parameters

$allowed_themes

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


Top ↑

Source

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

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
MU (3.0.0)Introduced.

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.