Begins implementing metadata sections schema. #792.

This commit is contained in:
mateuswetah 2023-06-29 12:10:39 -03:00
parent 989a435108
commit f5d4d4617f
2 changed files with 3 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -68,6 +68,7 @@ class Metadata_Sections extends Repository {
'type' => 'string', 'type' => 'string',
'description' => __( 'Whether the section metadata description should be displayed below the name instead of inside a tooltip.', 'tainacan' ), 'description' => __( 'Whether the section metadata description should be displayed below the name instead of inside a tooltip.', 'tainacan' ),
'on_error' => __( 'Please set the "Description below name" value as "yes" or "no"', 'tainacan' ), 'on_error' => __( 'Please set the "Description below name" value as "yes" or "no"', 'tainacan' ),
'enum' => [ 'yes', 'no' ],
'validation' => v::stringType()->in( [ 'yes', 'no' ] ), // yes or no 'validation' => v::stringType()->in( [ 'yes', 'no' ] ), // yes or no
'default' => 'no' 'default' => 'no'
], ],
@ -83,6 +84,7 @@ class Metadata_Sections extends Repository {
'type' => 'string', 'type' => 'string',
'description' => __( 'Binds this section visibility to a set of rules related to some metadata values.', 'tainacan' ), 'description' => __( 'Binds this section visibility to a set of rules related to some metadata values.', 'tainacan' ),
'on_error' => __( 'Value should be "yes" or "no"', 'tainacan' ), 'on_error' => __( 'Value should be "yes" or "no"', 'tainacan' ),
'enum' => [ 'yes', 'no' ],
'validation' => v::stringType()->in( [ 'yes', 'no' ] ), 'validation' => v::stringType()->in( [ 'yes', 'no' ] ),
'default' => 'no' 'default' => 'no'
], ],