Code Duplication    Length = 21-21 lines in 4 locations

src/wp-includes/ms-blogs.php 4 locations

@@ 339-359 (lines=21) @@
336
		return false;
337
338
	// If spam status changed, issue actions.
339
	if ( $details['spam'] != $current_details['spam'] ) {
340
		if ( $details['spam'] == 1 ) {
341
			/**
342
			 * Fires when the 'spam' status is added to a blog.
343
			 *
344
			 * @since MU
345
			 *
346
			 * @param int $blog_id Blog ID.
347
			 */
348
			do_action( 'make_spam_blog', $blog_id );
349
		} else {
350
			/**
351
			 * Fires when the 'spam' status is removed from a blog.
352
			 *
353
			 * @since MU
354
			 *
355
			 * @param int $blog_id Blog ID.
356
			 */
357
			do_action( 'make_ham_blog', $blog_id );
358
		}
359
	}
360
361
	// If mature status changed, issue actions.
362
	if ( $details['mature'] != $current_details['mature'] ) {
@@ 362-382 (lines=21) @@
359
	}
360
361
	// If mature status changed, issue actions.
362
	if ( $details['mature'] != $current_details['mature'] ) {
363
		if ( $details['mature'] == 1 ) {
364
			/**
365
			 * Fires when the 'mature' status is added to a blog.
366
			 *
367
			 * @since 3.1.0
368
			 *
369
			 * @param int $blog_id Blog ID.
370
			 */
371
			do_action( 'mature_blog', $blog_id );
372
		} else {
373
			/**
374
			 * Fires when the 'mature' status is removed from a blog.
375
			 *
376
			 * @since 3.1.0
377
			 *
378
			 * @param int $blog_id Blog ID.
379
			 */
380
			do_action( 'unmature_blog', $blog_id );
381
		}
382
	}
383
384
	// If archived status changed, issue actions.
385
	if ( $details['archived'] != $current_details['archived'] ) {
@@ 385-405 (lines=21) @@
382
	}
383
384
	// If archived status changed, issue actions.
385
	if ( $details['archived'] != $current_details['archived'] ) {
386
		if ( $details['archived'] == 1 ) {
387
			/**
388
			 * Fires when the 'archived' status is added to a blog.
389
			 *
390
			 * @since MU
391
			 *
392
			 * @param int $blog_id Blog ID.
393
			 */
394
			do_action( 'archive_blog', $blog_id );
395
		} else {
396
			/**
397
			 * Fires when the 'archived' status is removed from a blog.
398
			 *
399
			 * @since MU
400
			 *
401
			 * @param int $blog_id Blog ID.
402
			 */
403
			do_action( 'unarchive_blog', $blog_id );
404
		}
405
	}
406
407
	// If deleted status changed, issue actions.
408
	if ( $details['deleted'] != $current_details['deleted'] ) {
@@ 408-428 (lines=21) @@
405
	}
406
407
	// If deleted status changed, issue actions.
408
	if ( $details['deleted'] != $current_details['deleted'] ) {
409
		if ( $details['deleted'] == 1 ) {
410
			/**
411
			 * Fires when the 'deleted' status is added to a blog.
412
			 *
413
			 * @since 3.5.0
414
			 *
415
			 * @param int $blog_id Blog ID.
416
			 */
417
			do_action( 'make_delete_blog', $blog_id );
418
		} else {
419
			/**
420
			 * Fires when the 'deleted' status is removed from a blog.
421
			 *
422
			 * @since 3.5.0
423
			 *
424
			 * @param int $blog_id Blog ID.
425
			 */
426
			do_action( 'make_undelete_blog', $blog_id );
427
		}
428
	}
429
430
	if ( isset( $details['public'] ) ) {
431
		switch_to_blog( $blog_id );