allowed_themes
Filter HookDescription
Filters the array of themes allowed on the network.Hook Information
File Location |
wp-includes/class-wp-theme.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1692 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$allowed_themes
|
An array of theme stylesheet names. |
Usage Examples
Basic Usage
<?php
// Hook into allowed_themes
add_filter('allowed_themes', 'my_custom_filter', 10, 1);
function my_custom_filter($allowed_themes) {
// Your custom filtering logic here
return $allowed_themes;
}
Source Code Context
wp-includes/class-wp-theme.php:1692
- How this hook is used in WordPress core
<?php
1687 *
1688 * @since MU (3.0.0)
1689 *
1690 * @param string[] $allowed_themes An array of theme stylesheet names.
1691 */
1692 $allowed_themes = apply_filters( 'allowed_themes', $allowed_themes );
1693
1694 return $allowed_themes;
1695 }
1696
1697 /**
PHP Documentation
<?php
/**
* Filters the array of themes allowed on the network.
*
* @since MU (3.0.0)
*
* @param string[] $allowed_themes An array of theme stylesheet names.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/class-wp-theme.php
Related Hooks
Related hooks will be displayed here in future updates.