Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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