WP_Theme::get_allowed

Advertisement

Summery Summery

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

Syntax Syntax

WP_Theme::get_allowed( int $blog_id = null )

Parameters Parameters

$blog_id

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

Default value: null

Return Return

(string[]) Array of stylesheet names.

Source Source

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

		 * be filtered further.
		 *
		 * @since 4.5.0
		 *
		 * @param string[] $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 );
	}

	/**
	 * Returns array of stylesheet names of themes allowed on the network.
	 *
	 * @since 3.4.0

Advertisement

Changelog Changelog

Changelog
Version Description
3.4.0 Introduced.

Advertisement

Leave a Reply