Code Duplication    Length = 7-7 lines in 2 locations

wp-includes/class-wp-theme.php 2 locations

@@ 1285-1291 (lines=7) @@
1282
1283
		$current = $blog_id == get_current_blog_id();
1284
1285
		if ( $current ) {
1286
			$allowed_themes[ $blog_id ] = get_option( 'allowedthemes' );
1287
		} else {
1288
			switch_to_blog( $blog_id );
1289
			$allowed_themes[ $blog_id ] = get_option( 'allowedthemes' );
1290
			restore_current_blog();
1291
		}
1292
1293
		// This is all super old MU back compat joy.
1294
		// 'allowedthemes' keys things by stylesheet. 'allowed_themes' keyed things by name.
@@ 1296-1302 (lines=7) @@
1293
		// This is all super old MU back compat joy.
1294
		// 'allowedthemes' keys things by stylesheet. 'allowed_themes' keyed things by name.
1295
		if ( false === $allowed_themes[ $blog_id ] ) {
1296
			if ( $current ) {
1297
				$allowed_themes[ $blog_id ] = get_option( 'allowed_themes' );
1298
			} else {
1299
				switch_to_blog( $blog_id );
1300
				$allowed_themes[ $blog_id ] = get_option( 'allowed_themes' );
1301
				restore_current_blog();
1302
			}
1303
1304
			if ( ! is_array( $allowed_themes[ $blog_id ] ) || empty( $allowed_themes[ $blog_id ] ) ) {
1305
				$allowed_themes[ $blog_id ] = array();