apply_filters( 'network_allowed_themes', string[] $allowed_themes, int $blog_id )
- Since
- 4.5.0
Filters the array of themes allowed on the network.
Description
Site is provided as context so that a list of network allowed themes can be filtered further.
Compatibility
- WordPress
- since 4.5.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$allowed_themesstring[]- An array of theme stylesheet names.
$blog_idint- ID of the site.
Where this hook fires · 1
wp-includes/class-wp-theme.php:1668WP_Theme::get_allowed()
Source code
* * @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. *Changelog
Introduced in 4.5.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 6.7.7 tag, 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.