wpcf7_swv_get_meta_schema()
Returns an associative array of JSON Schema for Contact Form 7 SWV.
Хуков нет.
Возвращает
null. Ничего (null).
Использование
wpcf7_swv_get_meta_schema();
Код wpcf7_swv_get_meta_schema() wpcf7 swv get meta schema CF7 6.1.6
function wpcf7_swv_get_meta_schema() {
return array(
'$schema' => 'https://json-schema.org/draft/2020-12/schema',
'title' => 'Contact Form 7 SWV',
'description' => 'Contact Form 7 SWV meta-schema',
'type' => 'object',
'properties' => array(
'version' => array(
'type' => 'string',
),
'locale' => array(
'type' => 'string',
),
'rules' => array(
'type' => 'array',
'items' => array(
'type' => 'object',
'properties' => array(
'rule' => array(
'type' => 'string',
'enum' => array_keys( wpcf7_swv_available_rules() ),
),
'field' => array(
'type' => 'string',
'pattern' => '^[A-Za-z][-A-Za-z0-9_:]*$',
),
'error' => array(
'type' => 'string',
),
'accept' => array(
'type' => 'array',
'items' => array(
'type' => 'string',
),
),
'base' => array(
'type' => 'string',
),
'interval' => array(
'type' => 'number',
'minimum' => 0,
),
'threshold' => array(
'type' => 'string',
),
),
'required' => array( 'rule' ),
),
),
),
);
}