| Server IP : 31.214.178.99 / Your IP : 216.73.216.180 Web Server : Apache System : Linux hostingsrv1.dondominio.com 6.12.118+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.118-1 (2026-11-20) x86_64 User : ( 924851) PHP Version : 8.5.13 Disable Function : system,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,exec,ini_alter,show_source,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,eval MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /hosting/www/c3consulting.site/public/wp-content/plugins/wp-seo-multilingual/classes/ |
Upload File : |
<?php
namespace WPML\WPSEO;
class Utils {
/**
* List of deprecated Yoast hooks.
*
* @var array
*/
private static $deprecated_hooks = [
'wpseo_premium_post_redirect_slug_change' => [
'since' => '12.9.0',
'new_name' => 'Yoast\WP\SEO\post_redirect_slug_change',
],
];
/**
* Adds a filter considering deprecated hooks, for backward compatibility.
*
* @param string $name The name of the filter.
* @param string $callback The callback function we will call.
* @param string $priority The filter priority.
* @param string $arguments The number of arguments.
*/
public static function add_filter( $name, $callback, $priority = 10, $arguments = 1 ) {
if ( isset( self::$deprecated_hooks[ $name ] ) ) {
if ( version_compare( constant( 'WPSEO_VERSION' ), self::$deprecated_hooks[ $name ]['since'], '>=' ) ) {
$name = self::$deprecated_hooks[ $name ]['new_name'];
}
}
add_filter( $name, $callback, $priority, $arguments );
}
/**
* Checks if we are using the premium version.
*/
public static function isPremium() {
if ( ! function_exists( 'is_plugin_active' ) ) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
return is_plugin_active( 'wordpress-seo-premium/wp-seo-premium.php' );
}
/**
* @return bool
*/
public static function isFrontPageWithPosts() {
return is_front_page() && 'posts' === get_option( 'show_on_front' );
}
/**
* @return bool
*/
public static function isUsingDomains() {
return apply_filters( 'wpml_setting', [], 'language_domains' )
&& constant( 'WPML_LANGUAGE_NEGOTIATION_TYPE_DOMAIN' ) === (int) apply_filters( 'wpml_setting', 1, 'language_negotiation_type' );
}
}