2026-02-01 12:02:57 +00:00

44 lines
693 B
PHP

<?php
/**
* @package Polylang
*/
namespace WP_Syntex\Polylang\Options\Primitive;
use WP_Syntex\Polylang\Options\Abstract_Option;
defined( 'ABSPATH' ) || exit;
/**
* Class defining single string option.
*
* @since 3.7
*/
abstract class Abstract_String extends Abstract_Option {
/**
* Returns the default value.
*
* @since 3.7
*
* @return string
*/
protected function get_default() {
return '';
}
/**
* Returns the JSON schema part specific to this option.
*
* @since 3.7
*
* @return array Partial schema.
*
* @phpstan-return array{type: 'string'}
*/
protected function get_data_structure(): array {
return array(
'type' => 'string',
);
}
}