plugin updates
This commit is contained in:
@@ -60,6 +60,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
* @since 5.9.0 Added the Twenty Twenty-Two theme.
|
||||
* @since 6.1.0 Added the Twenty Twenty-Three theme.
|
||||
* @since 6.4.0 Added the Twenty Twenty-Four theme.
|
||||
* @since 6.7.0 Added the Twenty Twenty-Five theme.
|
||||
* @var string[]
|
||||
*/
|
||||
private static $default_themes = array(
|
||||
@@ -79,6 +80,7 @@ final class WP_Theme implements ArrayAccess {
|
||||
'twentytwentytwo' => 'Twenty Twenty-Two',
|
||||
'twentytwentythree' => 'Twenty Twenty-Three',
|
||||
'twentytwentyfour' => 'Twenty Twenty-Four',
|
||||
'twentytwentyfive' => 'Twenty Twenty-Five',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -1757,11 +1759,11 @@ final class WP_Theme implements ArrayAccess {
|
||||
// Set the option so we never have to go through this pain again.
|
||||
if ( is_admin() && $allowed_themes[ $blog_id ] ) {
|
||||
if ( $current ) {
|
||||
update_option( 'allowedthemes', $allowed_themes[ $blog_id ] );
|
||||
update_option( 'allowedthemes', $allowed_themes[ $blog_id ], false );
|
||||
delete_option( 'allowed_themes' );
|
||||
} else {
|
||||
switch_to_blog( $blog_id );
|
||||
update_option( 'allowedthemes', $allowed_themes[ $blog_id ] );
|
||||
update_option( 'allowedthemes', $allowed_themes[ $blog_id ], false );
|
||||
delete_option( 'allowed_themes' );
|
||||
restore_current_blog();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user