WP_Theme::get_allowed_on_network(): string[]
- Since
- 3.4.0
- Source
wp-includes/class-wp-theme.php:1696
Returns array of stylesheet names of themes allowed on the network.
Return
string[]- Array of stylesheet names.
Hooks fired · 1
One hook fires while WP_Theme::get_allowed_on_network() runs, in this order:
- apply_filters( allowed_themes )filterline 1709 (+13 into the body)
Filters the array of themes allowed on the network.
Uses · 2
- get_site_option()Retrieve an option value for the current network based on name of option.
- apply_filters()Calls the callback functions that have been added to a filter hook.
Used by · 4
- WP_Theme::get_allowed()Returns array of stylesheet names of themes allowed on the site or network.
- WP_Theme::is_allowed()Determines whether the theme is allowed (multisite only).
- get_site_allowed_themes()Deprecated functionality for getting themes network-enabled themes.
- wp_get_themes()Returns an array of WP_Theme objects based on the arguments.
Source
public static function get_allowed_on_network() { static $allowed_themes; if ( ! isset( $allowed_themes ) ) { $allowed_themes = (array) get_site_option( 'allowedthemes' ); } /** * Filters the array of themes allowed on the network. * * @since MU (3.0.0) * * @param string[] $allowed_themes An array of theme stylesheet names. */ $allowed_themes = apply_filters( 'allowed_themes', $allowed_themes ); return $allowed_themes; }History
Introduced in 3.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, from
src/wp-includes/class-wp-theme.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.