Code Duplication    Length = 3-7 lines in 2 locations

functions.gallery.php 1 location

@@ 35-41 (lines=7) @@
32
	 * Registers/enqueues the gallery settings admin js.
33
	 */
34
	function wp_enqueue_media() {
35
		if ( ! wp_script_is( 'jetpack-gallery-settings', 'registered' ) ) {
36
			/**
37
			 * This only happens if we're not in Jetpack, but on WPCOM instead.
38
			 * This is the correct path for WPCOM.
39
			 */
40
			wp_register_script( 'jetpack-gallery-settings', plugins_url( 'gallery-settings/gallery-settings.js', __FILE__ ), array( 'media-views' ), '20121225' );
41
		}
42
43
		wp_enqueue_script( 'jetpack-gallery-settings' );
44
	}

class.jetpack.php 1 location

@@ 748-750 (lines=3) @@
745
			wp_register_script( 'jquery.spin', plugins_url( '_inc/jquery.spin.js', JETPACK__PLUGIN_FILE ) , array( 'jquery', 'spin' ), '1.3' );
746
		}
747
748
		if ( ! wp_script_is( 'jetpack-gallery-settings', 'registered' ) ) {
749
			wp_register_script( 'jetpack-gallery-settings', plugins_url( '_inc/gallery-settings.js', JETPACK__PLUGIN_FILE ), array( 'media-views' ), '20121225' );
750
		}
751
752
		if ( ! wp_script_is( 'jetpack-twitter-timeline', 'registered' ) ) {
753
			wp_register_script( 'jetpack-twitter-timeline', plugins_url( '_inc/twitter-timeline.js', JETPACK__PLUGIN_FILE ) , array( 'jquery' ), '4.0.0', true );