| Server IP : 188.114.96.2 / Your IP : 104.23.197.231 Web Server : Apache/2.4.59 (Debian) System : Linux EDL-STRETCH 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64 User : edlftp ( 1002) PHP Version : 7.4.33 Disable Function : 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/nicolasj/www/old.ecoledelangues.be/wp-content/plugins/wp-seo-multilingual/ |
Upload File : |
<?php
/**
* Plugin Name: Yoast SEO Multilingual
* Plugin URI: https://wpml.org/
* Description: Compatibility layer for WordPress SEO and WPML | <a href="https://wpml.org/documentation/plugins-compatibility/using-wordpress-seo-with-wpml/">Documentation</a>
* Author: OnTheGoSystems
* Author URI: http://www.onthegosystems.com/
* Version: 1.1.0
* Plugin Slug: wp-seo-multilingual
*
* @package wpml/wpseo
*/
// Check if we are already active.
if ( defined( 'WPSEOML_VERSION' ) ) {
return;
}
define( 'WPSEOML_VERSION', '1.1.0' );
define( 'WPML_WPSEO_VERSION', WPSEOML_VERSION ); // TODO: remove this when WPML 4.3 is released (see wpmlwpseo-28).
define( 'WPSEOML_PLUGIN_PATH', dirname( __FILE__ ) );
require_once WPSEOML_PLUGIN_PATH . '/vendor/autoload.php';
// We have to do this early because wordpress-seo does it early too.
if ( apply_filters( 'wpml_setting', false, 'setup_complete' ) ) {
$redirector = new WPML_WPSEO_Redirection();
if ( $redirector->is_redirection() ) {
add_filter( 'wpml_skip_convert_url_string', '__return_true' );
}
}
/**
* Initialize plugin when WPML has loaded.
*/
function wpml_wpseo_init() {
// Dont load if Yoast SEO is not active.
if ( ! defined( 'WPSEO_VERSION' ) ) {
return;
}
// WPML prior to 4.2.5 runs its own compatibility classes.
if ( version_compare( ICL_SITEPRESS_VERSION, '4.2.5', '<' ) ) {
return;
}
$actions_filters_loader = new WPML_Action_Filter_Loader();
$actions_filters_loader->load(
array(
'WPML_WPSEO_Main_Factory',
)
);
}
add_action( 'wpml_loaded', 'wpml_wpseo_init' );
/**
* We need to do the redirection checks before wordpress-seo loads.
* To resolve this we move ourselves first in the plugins list.
* By using priority 1 we will go after WPML core.
*/
function wpml_wpseo_loads_first() {
$path = str_replace( WP_PLUGIN_DIR . '/', '', __FILE__ );
$plugins = get_option( 'active_plugins' );
$key = array_search( $path, (array) $plugins, true );
if ( $plugins && $key ) {
array_splice( $plugins, $key, 1 );
array_unshift( $plugins, $path );
update_option( 'active_plugins', $plugins );
}
}
add_action( 'activated_plugin', 'wpml_wpseo_loads_first', 1 );