Code Duplication    Length = 10-10 lines in 2 locations

class-jetpack-wizard-banner.php 1 location

@@ 96-105 (lines=10) @@
93
	/**
94
	 * AJAX callback
95
	 */
96
	public static function ajax_callback() {
97
		check_ajax_referer( 'jp-wizard-banner-nonce', 'nonce' );
98
99
		if ( isset( $_REQUEST['dismissBanner'] ) ) {
100
			Jetpack_Options::update_option( 'dismissed_wizard_banner', 1 );
101
			wp_send_json_success();
102
		}
103
104
		wp_die();
105
	}
106
107
	/**
108
	 * Renders the Wizard Banner

class.jetpack.php 1 location

@@ 989-998 (lines=10) @@
986
		return $params;
987
	}
988
989
	function jetpack_connection_banner_callback() {
990
		check_ajax_referer( 'jp-connection-banner-nonce', 'nonce' );
991
992
		if ( isset( $_REQUEST['dismissBanner'] ) ) {
993
			Jetpack_Options::update_option( 'dismissed_connection_banner', 1 );
994
			wp_send_json_success();
995
		}
996
997
		wp_die();
998
	}
999
1000
	/**
1001
	 * Removes all XML-RPC methods that are not `jetpack.*`.