Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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