Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 4211-4215 (lines=5) @@
4208
4209
			if ( $active_state ) {
4210
				$titles = array();
4211
				foreach ( $active_state as $mod ) {
4212
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4213
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4214
					}
4215
				}
4216
				if ( $titles ) {
4217
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following new modules have been activated: %l.', 'jetpack' ), $titles );
4218
				}
@@ 4223-4227 (lines=5) @@
4220
4221
			if ( $reactive_state = Jetpack::state( 'reactivated_modules' ) ) {
4222
				$titles = array();
4223
				foreach ( explode( ',',  $reactive_state ) as $mod ) {
4224
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4225
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4226
					}
4227
				}
4228
				if ( $titles ) {
4229
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following modules have been updated: %l.', 'jetpack' ), $titles );
4230
				}