Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 971-980 (lines=10) @@
968
						echo '<p>', esc_html( $this->strings['plugin_activated'] ), '</p>';
969
					}
970
				}
971
			} elseif ( $this->is_plugin_active( $slug ) ) {
972
				// No simpler message format provided as this message should never be encountered
973
				// on the plugin install page.
974
				echo '<div id="message" class="error"><p>',
975
					sprintf(
976
						esc_html( $this->strings['plugin_already_active'] ),
977
						'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
978
					),
979
					'</p></div>';
980
			} elseif ( $this->does_plugin_require_update( $slug ) ) {
981
				if ( ! $automatic ) {
982
					// Make sure message doesn't display again if bulk activation is performed
983
					// immediately after a single activation.
@@ 984-991 (lines=8) @@
981
				if ( ! $automatic ) {
982
					// Make sure message doesn't display again if bulk activation is performed
983
					// immediately after a single activation.
984
					if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK.
985
						echo '<div id="message" class="error"><p>',
986
							sprintf(
987
								esc_html( $this->strings['plugin_needs_higher_version'] ),
988
								'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
989
							),
990
							'</p></div>';
991
					}
992
				} else {
993
					// Simpler message layout for use on the plugin install page.
994
					echo '<p>', sprintf( esc_html( $this->strings['plugin_needs_higher_version'] ), esc_html( $this->plugins[ $slug ]['name'] ) ), '</p>';