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 / Version.php

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

55 lines 1001 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_Syntex\Polylang\Options\Primitive\Abstract_String;
9
10 defined( 'ABSPATH' ) || exit;
11
12 /**
13 * Class defining the "version" option.
14 *
15 * @since 3.7
16 */
17 class Version extends Abstract_String {
18 /**
19 * Returns option key.
20 *
21 * @since 3.7
22 *
23 * @return string
24 *
25 * @phpstan-return 'version'
26 */
27 public static function key(): string {
28 return 'version';
29 }
30
31 /**
32 * Returns the description used in the JSON schema.
33 *
34 * @since 3.7
35 *
36 * @return string
37 */
38 protected function get_description(): string {
39 return __( "Polylang's version.", 'polylang' );
40 }
41
42 /**
43 * Returns the JSON schema part specific to this option.
44 *
45 * @since 3.7
46 *
47 * @return array Partial schema.
48 *
49 * @phpstan-return array{type: 'string', readonly: true, readonly: true}
50 */
51 protected function get_data_structure(): array {
52 return array_merge( parent::get_data_structure(), array( 'readonly' => true ) );
53 }
54 }
55