Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 1270-1276 (lines=7) @@
1267
1268
		$current = $blog_id == get_current_blog_id();
1269
1270
		if ( $current ) {
1271
			$allowed_themes[ $blog_id ] = get_option( 'allowedthemes' );
1272
		} else {
1273
			switch_to_blog( $blog_id );
1274
			$allowed_themes[ $blog_id ] = get_option( 'allowedthemes' );
1275
			restore_current_blog();
1276
		}
1277
1278
		// This is all super old MU back compat joy.
1279
		// 'allowedthemes' keys things by stylesheet. 'allowed_themes' keyed things by name.
@@ 1281-1287 (lines=7) @@
1278
		// This is all super old MU back compat joy.
1279
		// 'allowedthemes' keys things by stylesheet. 'allowed_themes' keyed things by name.
1280
		if ( false === $allowed_themes[ $blog_id ] ) {
1281
			if ( $current ) {
1282
				$allowed_themes[ $blog_id ] = get_option( 'allowed_themes' );
1283
			} else {
1284
				switch_to_blog( $blog_id );
1285
				$allowed_themes[ $blog_id ] = get_option( 'allowed_themes' );
1286
				restore_current_blog();
1287
			}
1288
1289
			if ( ! is_array( $allowed_themes[ $blog_id ] ) || empty( $allowed_themes[ $blog_id ] ) ) {
1290
				$allowed_themes[ $blog_id ] = array();