Code Duplication    Length = 7-17 lines in 2 locations

json-endpoints/jetpack/class.jetpack-json-api-modules-endpoint.php 1 location

@@ 96-102 (lines=7) @@
93
94
		// Fetch the HTML formatted long description
95
		ob_start();
96
		if ( Jetpack::is_active() && has_action( 'jetpack_module_more_info_connected_' . $module_slug ) ) {
97
			do_action( 'jetpack_module_more_info_connected_' . $module_slug );
98
		} else {
99
			do_action( 'jetpack_module_more_info_' . $module_slug );
100
		}
101
		$module['description']  = ob_get_clean();
102
103
		return $module;
104
	}
105

class.jetpack-admin.php 1 location

@@ 91-107 (lines=17) @@
88
				$module_array['learn_more_button'] = ob_get_clean();
89
90
				ob_start();
91
				if ( Jetpack::is_active() && has_action( 'jetpack_module_more_info_connected_' . $module ) ) {
92
					do_action( 'jetpack_module_more_info_connected_' . $module );
93
				} else {
94
					do_action( 'jetpack_module_more_info_' . $module );
95
				}
96
				
97
				/**
98
				* Filter the long description of a module.
99
	 			*
100
	 			* @since 3.5.0
101
	 			*
102
	 			* @param string ob_get_clean() The module long description.
103
				* @param string $module The module name.
104
	 			*/
105
				$module_array['long_description'] = apply_filters( 'jetpack_long_module_description', ob_get_clean(), $module );
106
107
				ob_start();
108
				/**
109
				 * Filter the search terms for a module
110
				 *