Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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