Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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