Title: WP_Theme::get_allowed_on_network
Published: April 25, 2014
Last modified: May 20, 2026

---

# WP_Theme::get_allowed_on_network(): string[]

## In this article

 * [Return](https://developer.wordpress.org/reference/classes/wp_theme/get_allowed_on_network/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/wp_theme/get_allowed_on_network/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/classes/wp_theme/get_allowed_on_network/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/classes/wp_theme/get_allowed_on_network/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_theme/get_allowed_on_network/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_theme/get_allowed_on_network/?output_format=md#wp--skip-link--target)

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

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_theme/get_allowed_on_network/?output_format=md#return)󠁿

 string[] Array of stylesheet names.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_theme/get_allowed_on_network/?output_format=md#source)󠁿

    ```php
    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;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-theme.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/class-wp-theme.php#L1687)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/class-wp-theme.php#L1687-L1703)

## 󠀁[Hooks](https://developer.wordpress.org/reference/classes/wp_theme/get_allowed_on_network/?output_format=md#hooks)󠁿

 [apply_filters( ‘allowed_themes’, string[] $allowed_themes )](https://developer.wordpress.org/reference/hooks/allowed_themes/)

Filters the array of themes allowed on the network.

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_theme/get_allowed_on_network/?output_format=md#related)󠁿

| Uses | Description | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  | 
| [get_site_option()](https://developer.wordpress.org/reference/functions/get_site_option/)`wp-includes/option.php` |

Retrieve an option value for the current network based on name of option.

  |

| Used by | Description | 
| [get_site_allowed_themes()](https://developer.wordpress.org/reference/functions/get_site_allowed_themes/)`wp-admin/includes/ms-deprecated.php` |

Deprecated functionality for getting themes network-enabled themes.

  | 
| [wp_get_themes()](https://developer.wordpress.org/reference/functions/wp_get_themes/)`wp-includes/theme.php` |

Returns an array of [WP_Theme](https://developer.wordpress.org/reference/classes/wp_theme/) objects based on the arguments.

  | 
| [WP_Theme::get_allowed()](https://developer.wordpress.org/reference/classes/wp_theme/get_allowed/)`wp-includes/class-wp-theme.php` |

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

  | 
| [WP_Theme::is_allowed()](https://developer.wordpress.org/reference/classes/wp_theme/is_allowed/)`wp-includes/class-wp-theme.php` |

Determines whether the theme is allowed (multisite only).

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_theme/get_allowed_on_network/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.4.0](https://developer.wordpress.org/reference/since/3.4.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_theme%2Fget_allowed_on_network%2F)
before being able to contribute a note or feedback.