Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 1071-1080 (lines=10) @@
1068
						echo '<p>', esc_html( $this->strings['plugin_activated'] ), '</p>';
1069
					}
1070
				}
1071
			} elseif ( $this->is_plugin_active( $slug ) ) {
1072
				// No simpler message format provided as this message should never be encountered
1073
				// on the plugin install page.
1074
				echo '<div id="message" class="error"><p>',
1075
					sprintf(
1076
						esc_html( $this->strings['plugin_already_active'] ),
1077
						'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
1078
					),
1079
					'</p></div>';
1080
			} elseif ( $this->does_plugin_require_update( $slug ) ) {
1081
				if ( ! $automatic ) {
1082
					// Make sure message doesn't display again if bulk activation is performed
1083
					// immediately after a single activation.
@@ 1084-1091 (lines=8) @@
1081
				if ( ! $automatic ) {
1082
					// Make sure message doesn't display again if bulk activation is performed
1083
					// immediately after a single activation.
1084
					if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK.
1085
						echo '<div id="message" class="error"><p>',
1086
							sprintf(
1087
								esc_html( $this->strings['plugin_needs_higher_version'] ),
1088
								'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
1089
							),
1090
							'</p></div>';
1091
					}
1092
				} else {
1093
					// Simpler message layout for use on the plugin install page.
1094
					echo '<p>', sprintf( esc_html( $this->strings['plugin_needs_higher_version'] ), esc_html( $this->plugins[ $slug ]['name'] ) ), '</p>';