| 1 |
<?php |
| 2 |
/** |
| 3 |
* Loads the WPML compatibility mode. |
| 4 |
* |
| 5 |
* @package Polylang |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
exit; // Don't access directly |
| 10 |
}; |
| 11 |
|
| 12 |
if ( $polylang->model->get_languages_list() ) { |
| 13 |
if ( ! defined( 'PLL_WPML_COMPAT' ) || PLL_WPML_COMPAT ) { |
| 14 |
PLL_WPML_Compat::instance(); // WPML API |
| 15 |
PLL_WPML_Config::instance(); // wpml-config.xml |
| 16 |
} |
| 17 |
|
| 18 |
add_filter( |
| 19 |
'pll_settings_modules', |
| 20 |
function( $modules ) { |
| 21 |
$modules[] = 'PLL_Settings_WPML'; |
| 22 |
return $modules; |
| 23 |
} |
| 24 |
); |
| 25 |
} |
| 26 |
|