| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package Polylang |
| 4 |
*/ |
| 5 |
|
| 6 |
defined( 'ABSPATH' ) || exit; |
| 7 |
|
| 8 |
/** |
| 9 |
* Class to advertize the Machine Translation module. |
| 10 |
* |
| 11 |
* @since 3.6 |
| 12 |
*/ |
| 13 |
class PLL_Settings_Preview_Machine_Translation extends PLL_Settings_Module { |
| 14 |
/** |
| 15 |
* Stores the display order priority. |
| 16 |
* |
| 17 |
* @var int |
| 18 |
*/ |
| 19 |
public $priority = 90; |
| 20 |
|
| 21 |
/** |
| 22 |
* Constructor. |
| 23 |
* |
| 24 |
* @since 3.6 |
| 25 |
* |
| 26 |
* @param PLL_Settings $polylang Polylang object. |
| 27 |
* @param array $args Optional. Addition arguments. |
| 28 |
* |
| 29 |
* @phpstan-param array{ |
| 30 |
* module?: non-falsy-string, |
| 31 |
* title?: string, |
| 32 |
* description?: string, |
| 33 |
* active_option?: non-falsy-string |
| 34 |
* } $args |
| 35 |
*/ |
| 36 |
public function __construct( &$polylang, array $args = array() ) { |
| 37 |
$default = array( |
| 38 |
'module' => 'machine_translation', |
| 39 |
'title' => __( 'Machine Translation', 'polylang' ), |
| 40 |
'description' => __( 'Allows linkage to DeepL Translate.', 'polylang' ), |
| 41 |
'active_option' => 'preview', |
| 42 |
); |
| 43 |
|
| 44 |
parent::__construct( $polylang, array_merge( $default, $args ) ); |
| 45 |
} |
| 46 |
} |
| 47 |
|