wppaste
WordPress

apply_filters( 'site_allowed_themes', string[] $allowed_themes, int $blog_id )

Since
4.5.0
Filters the array of themes allowed on the site.

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. Defaults to current site.

Where this hook fires · 2

  • wp-includes/class-wp-theme.php:1721WP_Theme::get_allowed_on_site()
  • wp-includes/class-wp-theme.php:1774WP_Theme::get_allowed_on_site()

Source code

			 *			 * @since 4.5.0			 *			 * @param string[] $allowed_themes An array of theme stylesheet names.			 * @param int      $blog_id        ID of the site. Defaults to current site.			 */			return (array) apply_filters( 'site_allowed_themes', $allowed_themes[ $blog_id ], $blog_id );		} 		$current = get_current_blog_id() === $blog_id; 		if ( $current ) {			$allowed_themes[ $blog_id ] = get_option( 'allowedthemes' );

Changelog

Introduced in 4.5.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 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.