Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

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