PluginProbe
Polylang / trunk
Polylang vtrunk
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 3.0.3 All 233 releases
polylang / src / modules / share-slug / settings-preview-share-slug.php

settings-preview-share-slug.php in Polylang trunk, at src/modules/share-slug/settings-preview-share-slug.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 * A class to advertize the Share slugs module.
8 *
9 * @since 1.9
10 * @since 3.1 Renamed from PLL_Settings_Share_Slug.
11 */
12 class PLL_Settings_Preview_Share_Slug extends PLL_Settings_Module {
13 /**
14 * Stores the display order priority.
15 *
16 * @var int
17 */
18 public $priority = 70;
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' => 'share-slugs',
38 'title' => __( 'Share 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 share the same URL slug across languages for posts and terms.', 'polylang' );
55 }
56 }
57