Code Duplication    Length = 2-4 lines in 3 locations

modules/publicize.php 1 location

@@ 45-46 (lines=2) @@
42
		if ( $this->in_jetpack ) {
43
			// if sharedaddy isn't active, the sharing menu hasn't been added yet
44
			$active = Jetpack::get_active_modules();
45
			if ( in_array( 'publicize', $active ) && ! in_array( 'sharedaddy', $active ) ) {
46
				add_action( 'admin_menu', array( &$publicize_ui, 'sharing_menu' ) );
47
			}
48
		}
49
	}

modules/likes.php 1 location

@@ 59-62 (lines=4) @@
56
57
			$active = Jetpack::get_active_modules();
58
59
			if ( ! in_array( 'sharedaddy', $active ) && ! in_array( 'publicize', $active ) ) {
60
				// we don't have a sharing page yet
61
				add_action( 'admin_menu', array( $this->settings, 'sharing_menu' ) );
62
			}
63
64
			if ( in_array( 'publicize', $active ) && ! in_array( 'sharedaddy', $active ) ) {
65
				// we have a sharing page but not the global options area

modules/comment-likes.php 1 location

@@ 50-53 (lines=4) @@
47
		if ( ! Jetpack::is_module_active( 'likes' ) ) {
48
			$active = Jetpack::get_active_modules();
49
50
			if ( ! in_array( 'sharedaddy', $active ) && ! in_array( 'publicize', $active ) ) {
51
				// we don't have a sharing page yet
52
				add_action( 'admin_menu', array( $this->settings, 'sharing_menu' ) );
53
			}
54
55
			if ( in_array( 'publicize', $active ) && ! in_array( 'sharedaddy', $active ) ) {
56
				// we have a sharing page but not the global options area