WP_Theme::get_allowed( int $blog_id = null )

Returns array of stylesheet names of themes allowed on the site or network.


Parameters

$blog_id

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

Default value: null


Return

(array) Array of stylesheet names.


Source

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

	public static function get_allowed( $blog_id = null ) {
		/**
		 * 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.
		 *
		 * @since WP-4.5.0
		 *
		 * @param array $allowed_themes An array of theme stylesheet names.
		 * @param int   $blog_id        ID of the site.
		 */
		$network = (array) apply_filters( 'network_allowed_themes', self::get_allowed_on_network(), $blog_id );
		return $network + self::get_allowed_on_site( $blog_id );
	}


Changelog

Changelog
Version Description
WP-3.4.0 Introduced.