get() ) { case '0': $value = '0: ' . __( 'The language is set from content', 'polylang' ); break; case '1': $value = '1: ' . __( 'The language is set from the directory name in pretty permalinks', 'polylang' ); break; case '2': $value = '2: ' . __( 'The language is set from the subdomain name in pretty permalinks', 'polylang' ); break; case '3': $value = '3: ' . __( 'The language is set from different domains', 'polylang' ); break; default: $value = ''; break; } return $this->format_single_value_for_site_health_info( $value ); } /** * Returns the default value. * * @since 3.7 * * @return int */ protected function get_default() { return 1; } /** * Returns the JSON schema part specific to this option. * * @since 3.7 * * @return array Partial schema. * * @phpstan-return array{type: 'integer', enum: list<0|1|2|3>|list<1|2|3>} */ protected function get_data_structure(): array { return array( 'type' => 'integer', 'enum' => 'yes' === get_option( 'pll_language_from_content_available' ) ? array( 0, 1, 2, 3 ) : array( 1, 2, 3 ), ); } /** * Returns the description used in the JSON schema. * * @since 3.7 * * @return string */ protected function get_description(): string { return __( 'Determine how the current language is defined.', 'polylang' ); } }