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