PluginProbe
Polylang / 3.8.10
Polylang v3.8.10
3.8.10 3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 All 234 releases
polylang / src / modules / translate-slugs / settings-preview-translate-slugs.php

settings-preview-translate-slugs.php in Polylang 3.8.10, at src/modules/translate-slugs/settings-preview-translate-slugs.php

57 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package Polylang
4 */
5
6 /**
7 * Class to advertize the Translate slugs module.
8 *
9 * @since 1.9
10 * @since 3.1 Renamed from PLL_Settings_Translate_Slugs.
11 */
12 class PLL_Settings_Preview_Translate_Slugs extends PLL_Settings_Module {
13 /**
14 * Stores the display order priority.
15 *
16 * @var int
17 */
18 public $priority = 80;
19
20 /**
21 * Constructor.
22 *
23 * @since 1.9
24 *
25 * @param PLL_Settings $polylang Polylang object.
26 * @param array $args Optional. Addition arguments.
27 *
28 * @phpstan-param array{
29 * module?: non-falsy-string,
30 * title?: string,
31 * description?: string,
32 * active_option?: non-falsy-string
33 * } $args
34 */
35 public function __construct( &$polylang, array $args = array() ) {
36 $default = array(
37 'module' => 'translate-slugs',
38 'title' => __( 'Translate slugs', 'polylang' ),
39 'description' => $this->get_description(),
40 'active_option' => 'preview',
41 );
42
43 parent::__construct( $polylang, array_merge( $default, $args ) );
44 }
45
46 /**
47 * Returns the module description.
48 *
49 * @since 3.1
50 *
51 * @return string
52 */
53 protected function get_description() {
54 return __( 'Allows to translate custom post types and taxonomies slugs in URLs.', 'polylang' );
55 }
56 }
57