HEX
Server: Apache
System: Linux cp4.skywebbox.com 5.14.0-503.15.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 28 07:25:19 EST 2024 x86_64
User: alfouzantranspor (1054)
PHP: 8.3.23
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/alfouzantranspor/www/wp-content/plugins/disable-emails/includes/functions-global.php
<?php
// NB: Minimum PHP version for this file is 5.3! No short array notation, no namespaces!

if (!defined('ABSPATH')) {
	exit;
}

/**
 * maybe show notice of minimum PHP version failure
 */
function disable_emails_fail_php_version() {
	disable_emails_load_text_domain();

	$requires = new DisableEmailsRequires();

	$requires->addNotice(
		disable_emails_external_link(
			/* translators: %1$s: minimum required version number, %2$s: installed version number */
			sprintf(esc_html__('It requires PHP %1$s or higher; your website has PHP %2$s which is {{a}}old, obsolete, and unsupported{{/a}}.', 'disable-emails'),
				esc_html(DISABLE_EMAILS_MIN_PHP), esc_html(PHP_VERSION)),
			'https://www.php.net/supported-versions.php'
		)
	);
	$requires->addNotice(
		/* translators: %s: minimum recommended version number */
		sprintf(esc_html__('Please upgrade your website hosting. At least PHP %s is recommended.', 'disable-emails'), '7.3')
	);
}

/**
 * load text translations
 */
function disable_emails_load_text_domain() {
	load_plugin_textdomain('disable-emails');
}

/**
 * replace link placeholders with an external link
 * @param string $template
 * @param string $url
 * @return string
 */
function disable_emails_external_link($template, $url) {
	$search = array(
		'{{a}}',
		'{{/a}}',
	);
	$replace = array(
		sprintf('<a rel="noopener" target="_blank" href="%s">', esc_url($url)),
		'</a>',
	);
	return str_replace($search, $replace, $template);
}