Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

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