Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 4222-4226 (lines=5) @@
4219
4220
			if ( $active_state ) {
4221
				$titles = array();
4222
				foreach ( $active_state as $mod ) {
4223
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4224
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4225
					}
4226
				}
4227
				if ( $titles ) {
4228
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following new modules have been activated: %l.', 'jetpack' ), $titles );
4229
				}
@@ 4234-4238 (lines=5) @@
4231
4232
			if ( $reactive_state = Jetpack::state( 'reactivated_modules' ) ) {
4233
				$titles = array();
4234
				foreach ( explode( ',',  $reactive_state ) as $mod ) {
4235
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4236
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4237
					}
4238
				}
4239
				if ( $titles ) {
4240
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following modules have been updated: %l.', 'jetpack' ), $titles );
4241
				}