HEX
Server: nginx/1.18.0
System: Linux iZj6c1ieg2jrpk1z5tzi19Z 6.3.9-1.el7.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 21 22:18:40 EDT 2023 x86_64
User: www (1001)
PHP: 8.2.4
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.cytocare.cn/wp-content/plugins/site-mailer/modules/core/components/conflicts.php
<?php

namespace SiteMailer\Modules\Core\Components;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

class Conflicts {
	private array $conflicting_plugins;

	private const CONFLICTING_PLUGINS = [
		'fluent-smtp/fluent-smtp.php' => 'FluentSMTP',
		'post-smtp/postman-smtp.php' => 'Post SMTP',
		'easy-wp-smtp/easy-wp-smtp.php' => 'Easy WP SMTP',
		'mailin/sendinblue.php' => 'Newsletter, SMTP, Email marketing and Subscribe forms by Brevo',
		'smtp-mailer/main.php' => 'SMTP Mailer',
		'wp-mail-smtp/wp_mail_smtp.php' => 'WP Mail SMTP',
	];

	public function render_notice(): void {
		$conflicting_plugins_names = $this->conflicting_plugins;

		?>
		<div class="notice notice-warning site-mailer__notice site-mailer__notice--warning">
			<p>
				<b>
					<?php esc_html_e(
						'Site Mailer has detected multiple active SMTP plugins.',
						'site-mailer'
					); ?>
				</b>

				<span>
					<?php esc_html_e(
						'Using more than one may result in unexpected behavior.',
						'site-mailer'
					); ?>
				</span>
			</p>

			<form action="<?php echo esc_url( admin_url( 'plugins.php' ) ); ?>" method="post" style="margin:0.5em 0;padding:2px">
				<span style="margin-inline-end: 8px;"><?php echo esc_html( join( ', ', $conflicting_plugins_names ) ); ?></span>

				<input type="hidden" name="action" value="deactivate-selected">

				<?php foreach ( array_keys( $this->conflicting_plugins ) as $plugin ) { ?>
					<input type="hidden" name="checked[]" value="<?php echo esc_attr( $plugin ); ?>">
				<?php } ?>

				<input type="hidden" name="_wpnonce" value="<?php echo esc_attr( wp_create_nonce( 'bulk-plugins' ) ); ?>">

				<input type="submit"
							style="border:none;background-color:transparent;text-decoration:underline;cursor:pointer;font-size:13px;color:#135e96;"
							value="<?php esc_html_e( 'Deactivate All', 'site-mailer' ); ?>">
			</form>
		</div>
		<?php
	}

	public function get_conflicting_plugins(): array {
		$plugins = get_option( 'active_plugins' );
		$conflicting_plugins_file_names = array_keys( self::CONFLICTING_PLUGINS );
		$output = [];

		foreach ( $plugins as $plugin_file_name ) {
			if ( in_array( $plugin_file_name, $conflicting_plugins_file_names, true ) ) {
				$output[ $plugin_file_name ] = self::CONFLICTING_PLUGINS[ $plugin_file_name ];
			}
		}

		return $output;
	}

	public function __construct() {
		$this->conflicting_plugins = $this->get_conflicting_plugins();

		if ( ! empty( $this->conflicting_plugins ) ) {
			add_action( 'admin_notices', [ $this, 'render_notice' ] );
		}
	}
}