Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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