site_allowed_themes filter-hook . WP 4.5.0
Filters the array of themes allowed on the site.
Usage
add_filter( 'site_allowed_themes', 'filter_function_name_5501', 10, 2 ); function filter_function_name_5501( $allowed_themes, $blog_id ){ // filter... return $allowed_themes; }
- $allowed_themes(string[])
- An array of theme stylesheet names.
- $blog_id(int)
- ID of the site.
Default: current site
Changelog
Since 4.5.0 | Introduced. |
Where the hook is called
site_allowed_themes
wp-includes/class-wp-theme.php 1510
return (array) apply_filters( 'site_allowed_themes', $allowed_themes[ $blog_id ], $blog_id );
wp-includes/class-wp-theme.php 1561
return (array) apply_filters( 'site_allowed_themes', $allowed_themes[ $blog_id ], $blog_id );