Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

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