Code Duplication    Length = 15-15 lines in 2 locations

class.jetpack.php 2 locations

@@ 4711-4725 (lines=15) @@
4708
					wp_safe_redirect( admin_url() . 'plugins.php?deactivate=true&plugin_status=all&paged=1&s=' );
4709
				}
4710
				break;
4711
			case 'jetpack-manage-opt-out':
4712
4713
				if ( check_admin_referer( 'jetpack_manage_banner_opt_out' ) ) {
4714
					// Don't show the banner again
4715
4716
					Jetpack_Options::update_option( 'dismissed_manage_banner', true );
4717
					// redirect back to the page that had the notice
4718
					if ( wp_get_referer() ) {
4719
						wp_safe_redirect( wp_get_referer() );
4720
					} else {
4721
						// Take me to Jetpack
4722
						wp_safe_redirect( admin_url( 'admin.php?page=jetpack' ) );
4723
					}
4724
				}
4725
				break;
4726
			case 'jetpack-protect-multisite-opt-out':
4727
4728
				if ( check_admin_referer( 'jetpack_protect_multisite_banner_opt_out' ) ) {
@@ 4726-4740 (lines=15) @@
4723
					}
4724
				}
4725
				break;
4726
			case 'jetpack-protect-multisite-opt-out':
4727
4728
				if ( check_admin_referer( 'jetpack_protect_multisite_banner_opt_out' ) ) {
4729
					// Don't show the banner again
4730
4731
					update_site_option( 'jetpack_dismissed_protect_multisite_banner', true );
4732
					// redirect back to the page that had the notice
4733
					if ( wp_get_referer() ) {
4734
						wp_safe_redirect( wp_get_referer() );
4735
					} else {
4736
						// Take me to Jetpack
4737
						wp_safe_redirect( admin_url( 'admin.php?page=jetpack' ) );
4738
					}
4739
				}
4740
				break;
4741
			case 'jetpack-manage-opt-in':
4742
				if ( check_admin_referer( 'jetpack_manage_banner_opt_in' ) ) {
4743
					// This makes sure that we are redirect to jetpack home so that we can see the Success Message.