Code Duplication    Length = 2-3 lines in 2 locations

modules/publicize.php 1 location

@@ 50-51 (lines=2) @@
47
			add_filter( 'jetpack_sync_post_module_custom_data', array( $this, 'sync_post_module_custom_data' ), 10, 2 );
48
			// if sharedaddy isn't active, the sharing menu hasn't been added yet
49
			$active = Jetpack::get_active_modules();
50
			if ( in_array( 'publicize', $active ) && !in_array( 'sharedaddy', $active ) )
51
				add_action( 'admin_menu', array( &$publicize_ui, 'sharing_menu' ) );
52
		}
53
	}
54

modules/likes.php 1 location

@@ 56-58 (lines=3) @@
53
54
			$active = Jetpack::get_active_modules();
55
56
			if ( ! in_array( 'sharedaddy', $active ) && ! in_array( 'publicize', $active ) ) {
57
				add_action( 'admin_menu', array( $this, 'sharing_menu' ) );	// we don't have a sharing page yet
58
			}
59
60
			if ( in_array( 'publicize', $active ) && ! in_array( 'sharedaddy', $active ) ) {
61
				add_action( 'pre_admin_screen_sharing', array( $this, 'sharing_block' ), 20 ); // we have a sharing page but not the global options area