Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 4182-4186 (lines=5) @@
4179
4180
			if ( $active_state ) {
4181
				$titles = array();
4182
				foreach ( $active_state as $mod ) {
4183
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4184
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4185
					}
4186
				}
4187
				if ( $titles ) {
4188
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following new modules have been activated: %l.', 'jetpack' ), $titles );
4189
				}
@@ 4194-4198 (lines=5) @@
4191
4192
			if ( $reactive_state = Jetpack::state( 'reactivated_modules' ) ) {
4193
				$titles = array();
4194
				foreach ( explode( ',',  $reactive_state ) as $mod ) {
4195
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4196
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4197
					}
4198
				}
4199
				if ( $titles ) {
4200
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following modules have been updated: %l.', 'jetpack' ), $titles );
4201
				}