Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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