| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package Polylang |
| 4 |
*/ |
| 5 |
|
| 6 |
/** |
| 7 |
* A class to inform about the WPML compatibility module in Polylang settings |
| 8 |
* |
| 9 |
* @since 1.8 |
| 10 |
*/ |
| 11 |
class PLL_Settings_WPML extends PLL_Settings_Module { |
| 12 |
/** |
| 13 |
* Stores the display order priority. |
| 14 |
* |
| 15 |
* @var int |
| 16 |
*/ |
| 17 |
public $priority = 60; |
| 18 |
|
| 19 |
/** |
| 20 |
* Constructor |
| 21 |
* |
| 22 |
* @since 1.8 |
| 23 |
* |
| 24 |
* @param object $polylang polylang object |
| 25 |
*/ |
| 26 |
public function __construct( &$polylang ) { |
| 27 |
parent::__construct( |
| 28 |
$polylang, |
| 29 |
array( |
| 30 |
'module' => 'wpml', |
| 31 |
'title' => __( 'WPML compatibility', 'polylang' ), |
| 32 |
'description' => __( 'Polylang\'s WPML compatibility mode', 'polylang' ), |
| 33 |
) |
| 34 |
); |
| 35 |
} |
| 36 |
|
| 37 |
/** |
| 38 |
* Tells if the module is active |
| 39 |
* |
| 40 |
* @since 1.8 |
| 41 |
* |
| 42 |
* @return bool |
| 43 |
*/ |
| 44 |
public function is_active() { |
| 45 |
return ! defined( 'PLL_WPML_COMPAT' ) || PLL_WPML_COMPAT; |
| 46 |
} |
| 47 |
} |
| 48 |
|