Summery Summery
Enables a theme for all sites on the current network.
Syntax Syntax
Parameters Parameters
- $stylesheets
-
(Required) Stylesheet name or array of stylesheet names.
Source Source
File: wp-includes/class-wp-theme.php
$allowed_themes = get_site_option( 'allowedthemes' ); foreach ( $stylesheets as $stylesheet ) { $allowed_themes[ $stylesheet ] = true; } update_site_option( 'allowedthemes', $allowed_themes ); } /** * Disables a theme for all sites on the current network. * * @since 4.6.0 * * @param string|string[] $stylesheets Stylesheet name or array of stylesheet names. */ public static function network_disable_theme( $stylesheets ) {
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.6.0 | Introduced. |