Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 4122-4126 (lines=5) @@
4119
4120
			if ( $active_state ) {
4121
				$titles = array();
4122
				foreach ( $active_state as $mod ) {
4123
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4124
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4125
					}
4126
				}
4127
				if ( $titles ) {
4128
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following new modules have been activated: %l.', 'jetpack' ), $titles );
4129
				}
@@ 4134-4138 (lines=5) @@
4131
4132
			if ( $reactive_state = Jetpack::state( 'reactivated_modules' ) ) {
4133
				$titles = array();
4134
				foreach ( explode( ',',  $reactive_state ) as $mod ) {
4135
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
4136
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
4137
					}
4138
				}
4139
				if ( $titles ) {
4140
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following modules have been updated: %l.', 'jetpack' ), $titles );
4141
				}