PluginProbe
Polylang / 3.7
Polylang v3.7
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 / include / Options / Business / Redirect_Lang.php

Redirect_Lang.php in Polylang 3.7, at include/Options/Business/Redirect_Lang.php

49 lines 976 B
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 namespace WP_Syntex\Polylang\Options\Business;
7
8 use WP_Error;
9 use WP_Syntex\Polylang\Options\Primitive\Abstract_Boolean;
10 use WP_Syntex\Polylang\Options\Options;
11
12 defined( 'ABSPATH' ) || exit;
13
14 /**
15 * Class defining the "Remove the page name or page id from the URL of the front page" boolean option.
16 *
17 * @since 3.7
18 */
19 class Redirect_Lang extends Abstract_Boolean {
20 /**
21 * Returns option key.
22 *
23 * @since 3.7
24 *
25 * @return string
26 *
27 * @phpstan-return 'redirect_lang'
28 */
29 public static function key(): string {
30 return 'redirect_lang';
31 }
32
33 /**
34 * Returns the description used in the JSON schema.
35 *
36 * @since 3.7
37 *
38 * @return string
39 */
40 protected function get_description(): string {
41 return sprintf(
42 /* translators: %1$s and %2$s are "true/false" values. */
43 __( 'Remove the page name or page ID from the URL of the front page: %1$s to remove, %2$s to keep.', 'polylang' ),
44 '`true`',
45 '`false`'
46 );
47 }
48 }
49