Code Duplication    Length = 7-12 lines in 2 locations

class.jetpack-idc.php 1 location

@@ 116-127 (lines=12) @@
113
	/**
114
	 * Enqueue scripts for the notice
115
	 */
116
	function enqueue_idc_notice_files() {
117
		wp_enqueue_script( 'jetpack-idc-js', plugins_url( '_inc/idc-notice.js', JETPACK__PLUGIN_FILE ),
118
			array( 'jquery' ), JETPACK__VERSION, true );
119
		wp_localize_script(
120
			'jetpack-idc-js',
121
			'idc',
122
			array(
123
				'ajaxurl'    => admin_url( 'admin-ajax.php' ),
124
				'jitm_nonce' => wp_create_nonce( 'jetpack-jitm-nonce' ),
125
			)
126
		);
127
	}
128
}
129
130
Jetpack_IDC::init();

class.jetpack-tracks.php 1 location

@@ 24-30 (lines=7) @@
21
		add_action( 'jetpack_user_authorized',       array( __CLASS__, 'track_user_linked' ) );
22
	}
23
24
	static function enqueue_tracks_scripts() {
25
		wp_enqueue_script( 'jptracks', plugins_url( '_inc/lib/tracks/tracks-ajax.js', JETPACK__PLUGIN_FILE ), array(), JETPACK__VERSION, true );
26
		wp_localize_script( 'jptracks', 'jpTracksAJAX', array(
27
			'ajaxurl'            => admin_url( 'admin-ajax.php' ),
28
			'jpTracksAJAX_nonce' => wp_create_nonce( 'jp-tracks-ajax-nonce' ),
29
		) );
30
	}
31
32
	/* User has linked their account */
33
	static function track_user_linked() {