Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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