| Server IP : 82.208.35.60 / Your IP : 216.73.217.33 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/d2m/sofident_cz/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 );
}
}