Code Duplication    Length = 2-4 lines in 3 locations

modules/publicize.php 1 location

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

modules/comment-likes.php 1 location

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

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