Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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