Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 1097-1106 (lines=10) @@
1094
						echo '<p>', esc_html( $this->strings['plugin_activated'] ), '</p>';
1095
					}
1096
				}
1097
			} elseif ( $this->is_plugin_active( $slug ) ) {
1098
				// No simpler message format provided as this message should never be encountered
1099
				// on the plugin install page.
1100
				echo '<div id="message" class="error"><p>',
1101
					sprintf(
1102
						esc_html( $this->strings['plugin_already_active'] ),
1103
						'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
1104
					),
1105
					'</p></div>';
1106
			} elseif ( $this->does_plugin_require_update( $slug ) ) {
1107
				if ( ! $automatic ) {
1108
					// Make sure message doesn't display again if bulk activation is performed
1109
					// immediately after a single activation.
@@ 1111-1118 (lines=8) @@
1108
					// Make sure message doesn't display again if bulk activation is performed
1109
					// immediately after a single activation.
1110
					// phpcs:ignore WordPress.Security.NonceVerification.Missing -- Not using the superglobal.
1111
					if ( ! isset( $_POST['action'] ) ) {
1112
						echo '<div id="message" class="error"><p>',
1113
							sprintf(
1114
								esc_html( $this->strings['plugin_needs_higher_version'] ),
1115
								'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
1116
							),
1117
							'</p></div>';
1118
					}
1119
				} else {
1120
					// Simpler message layout for use on the plugin install page.
1121
					echo '<p>', sprintf( esc_html( $this->strings['plugin_needs_higher_version'] ), esc_html( $this->plugins[ $slug ]['name'] ) ), '</p>';