PluginProbe
Polylang / 3.8.4
Polylang v3.8.4
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 / Options / Business / Previous_Version.php

Previous_Version.php in Polylang 3.8.4, at src/Options/Business/Previous_Version.php

58 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 namespace WP_Syntex\Polylang\Options\Business;
7
8 use WP_Syntex\Polylang\Options\Options;
9
10 defined( 'ABSPATH' ) || exit;
11
12 /**
13 * Class defining the "previous version" option.
14 *
15 * @since 3.7
16 */
17 class Previous_Version extends Version {
18 /**
19 * Returns option key.
20 *
21 * @since 3.7
22 *
23 * @return string
24 *
25 * @phpstan-return 'previous_version'
26 */
27 public static function key(): string {
28 return 'previous_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 previous version.", 'polylang' );
40 }
41
42 /**
43 * Adds information to the site health info array.
44 *
45 * @since 3.8
46 *
47 * @param Options $options An instance of the Options class providing additional configuration.
48 *
49 * @return array The updated site health information.
50 */
51 public function get_site_health_info( Options $options ): array { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
52 if ( ! $this->get() ) {
53 return $this->format_single_value_for_site_health_info( __( 'This is the first activation', 'polylang' ) );
54 }
55 return parent::get_site_health_info( $options );
56 }
57 }
58