Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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