HEX
Server: Apache/2
System: Linux da1 5.14.0-611.9.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 27 10:37:27 EST 2025 x86_64
User: mdosdorg (1028)
PHP: 8.3.14
Disabled: exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname,mail
Upload Files
File: /home/mdosdorg/domains/mdo-sd.org/public_html/wp-content/plugins/site-mailer/classes/utils.php
<?php

namespace SiteMailer\Classes;

use SiteMailer\Classes\Services\Client;

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

class Utils {

	public static function get_api_client(): ?Client {
		return Client::get_instance();
	}

	public static function is_plugin_page(): bool {
		$current_screen = get_current_screen();

		return str_contains( $current_screen->id, 'site-mailer-' );
	}
	public static function user_is_admin(): bool {
		return current_user_can( 'manage_options' );
	}
	public static function is_wp_dashboard_page(): bool {
		$current_screen = get_current_screen();

		return str_contains( $current_screen->id, 'dashboard' );
	}

	public static function is_wp_settings_page(): bool {
		$current_screen = get_current_screen();

		return str_contains( $current_screen->id, 'options-' );
	}

}