Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 1055-1064 (lines=10) @@
1052
						echo '<p>', esc_html( $this->strings['plugin_activated'] ), '</p>';
1053
					}
1054
				}
1055
			} elseif ( $this->is_plugin_active( $slug ) ) {
1056
				// No simpler message format provided as this message should never be encountered
1057
				// on the plugin install page.
1058
				echo '<div id="message" class="error"><p>',
1059
					sprintf(
1060
						esc_html( $this->strings['plugin_already_active'] ),
1061
						'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
1062
					),
1063
					'</p></div>';
1064
			} elseif ( $this->does_plugin_require_update( $slug ) ) {
1065
				if ( ! $automatic ) {
1066
					// Make sure message doesn't display again if bulk activation is performed
1067
					// immediately after a single activation.
@@ 1068-1075 (lines=8) @@
1065
				if ( ! $automatic ) {
1066
					// Make sure message doesn't display again if bulk activation is performed
1067
					// immediately after a single activation.
1068
					if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK.
1069
						echo '<div id="message" class="error"><p>',
1070
							sprintf(
1071
								esc_html( $this->strings['plugin_needs_higher_version'] ),
1072
								'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
1073
							),
1074
							'</p></div>';
1075
					}
1076
				} else {
1077
					// Simpler message layout for use on the plugin install page.
1078
					echo '<p>', sprintf( esc_html( $this->strings['plugin_needs_higher_version'] ), esc_html( $this->plugins[ $slug ]['name'] ) ), '</p>';