Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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