acf_field_icon_picker::get_rest_schema
Returns the schema used by the REST API.
Метод класса: acf_field_icon_picker{}
Хуков нет.
Возвращает
Массив
.
Использование
$acf_field_icon_picker = new acf_field_icon_picker(); $acf_field_icon_picker->get_rest_schema( $field ): array;
- $field(массив) (обязательный)
- The main field array.
Список изменений
С версии 6.3 | Введена. |
Код acf_field_icon_picker::get_rest_schema() acf field icon picker::get rest schema ACF 6.4.2
public function get_rest_schema( array $field ): array { return array( 'type' => array( 'object', 'null' ), 'required' => ! empty( $field['required'] ), 'properties' => array( 'type' => array( 'description' => esc_html__( 'The type of icon to save.', 'acf' ), 'type' => array( 'string' ), 'required' => true, 'enum' => array_keys( $this->get_tabs() ), ), 'value' => array( 'description' => esc_html__( 'The value of icon to save.', 'acf' ), 'type' => array( 'string', 'int' ), 'required' => true, ), ), ); }