network_allowed_themes filter-hookWP 4.5.0

Filters the array of themes allowed on the network.

Site is provided as context so that a list of network allowed themes can be filtered further.


add_filter( 'network_allowed_themes', 'wp_kama_network_allowed_themes_filter', 10, 2 );

 * Function for `network_allowed_themes` filter-hook.
 * @param string[] $allowed_themes An array of theme stylesheet names.
 * @param int      $blog_id        ID of the site.
 * @return string[]
function wp_kama_network_allowed_themes_filter( $allowed_themes, $blog_id ){

	// filter...
	return $allowed_themes;
An array of theme stylesheet names.
ID of the site.


Since 4.5.0 Introduced.

Where the hook is called

wp-includes/class-wp-theme.php 1661
$network = (array) apply_filters( 'network_allowed_themes', self::get_allowed_on_network(), $blog_id );

Where the hook is used in WordPress

Usage not found.