Code Duplication    Length = 21-21 lines in 4 locations

wp-includes/ms-blogs.php 4 locations

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