Code Duplication    Length = 8-10 lines in 2 locations

class-tgm-plugin-activation.php 2 locations

@@ 959-968 (lines=10) @@
956
						echo '<p>', esc_html( $this->strings['plugin_activated'] ), '</p>';
957
					}
958
				}
959
			} elseif ( $this->is_plugin_active( $slug ) ) {
960
				// No simpler message format provided as this message should never be encountered
961
				// on the plugin install page.
962
				echo '<div id="message" class="error"><p>',
963
					sprintf(
964
						esc_html( $this->strings['plugin_already_active'] ),
965
						'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
966
					),
967
					'</p></div>';
968
			} elseif ( $this->does_plugin_require_update( $slug ) ) {
969
				if ( ! $automatic ) {
970
					// Make sure message doesn't display again if bulk activation is performed
971
					// immediately after a single activation.
@@ 972-979 (lines=8) @@
969
				if ( ! $automatic ) {
970
					// Make sure message doesn't display again if bulk activation is performed
971
					// immediately after a single activation.
972
					if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK.
973
						echo '<div id="message" class="error"><p>',
974
							sprintf(
975
								esc_html( $this->strings['plugin_needs_higher_version'] ),
976
								'<strong>' . esc_html( $this->plugins[ $slug ]['name'] ) . '</strong>'
977
							),
978
							'</p></div>';
979
					}
980
				} else {
981
					// Simpler message layout for use on the plugin install page.
982
					echo '<p>', sprintf( esc_html( $this->strings['plugin_needs_higher_version'] ), esc_html( $this->plugins[ $slug ]['name'] ) ), '</p>';