/home/vianto5/heredit.mx/wp-content/plugins/wpforms/src/Integrations/Abilities
Edit: /home/vianto5/heredit.mx/wp-content/plugins/wpforms/src/Integrations/Abilities/FieldRegistry.php (14758B)
property-keys map.
* Both are filterable so addons can extend without core edits.
*
* @since 1.10.2
*/
class FieldRegistry {
/**
* Availability requirement: always available.
*
* @since 1.10.2
*/
private const ALWAYS = 'always';
/**
* Availability requirement: requires Pro license.
*
* @since 1.10.2
*/
private const PRO = 'pro';
/**
* Property catalog: key => [ schema fragment, sanitizer callable ].
*
* @since 1.10.2
*
* @return array
*/
private function properties(): array {
$properties = [
'label' => [
'schema' => [ 'type' => 'string' ],
'sanitize' => 'sanitize_text_field',
],
'description' => [
'schema' => [ 'type' => 'string' ],
'sanitize' => 'sanitize_text_field',
],
'required' => [
'schema' => [ 'type' => 'boolean' ],
'sanitize' => [ $this, 'sanitize_bool' ],
],
'size' => [
'schema' => [
'type' => 'string',
'enum' => [ 'small', 'medium', 'large' ],
],
'sanitize' => 'sanitize_text_field',
],
'label_hide' => [
'schema' => [ 'type' => 'boolean' ],
'sanitize' => [ $this, 'sanitize_bool' ],
],
'placeholder' => [
'schema' => [ 'type' => 'string' ],
'sanitize' => 'sanitize_text_field',
],
'default_value' => [
'schema' => [ 'type' => 'string' ],
'sanitize' => 'sanitize_text_field',
],
'input_columns' => [
'schema' => [
'type' => 'string',
'enum' => [ '', 'inline', '2', '3' ],
],
'sanitize' => 'sanitize_text_field',
],
'style' => [
// Shared `$field['style']` storage key. For Dropdown (select): `classic` is
// the plain browser-native `