BP_REST_Document_Endpoint: get_item_schema ()

获取符合JSON模式的文档模式。

描述

返回

(数组)

文件:bp-document /类/ class-bp-rest-document-endpoint.php

公用函数get_item_schema(){$ schema = array('$ schema'=>''http://json-schema.org/draft -04/schema#','标题'=>'bp_document','type'=>'对象','属性'=>数组('id'=>数组('context'=>数组('嵌入','查看','编辑'),'description'=> __('唯一数字ID对于文档。','buddyboss'),'readonly'=> true,'type'=>'整数','blog_id'=>数组('context'=>数组('嵌入','查看'),'编辑'),'描述'=> __( 'Current Site ID.', 'buddyboss' ), 'readonly' => true, 'type' => 'integer', ), 'attachment_id' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Unique identifier for the document object.', 'buddyboss' ), 'readonly' => true, 'type' => 'integer', ), 'user_id' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'The ID for the author of the document.', 'buddyboss' ), 'readonly' => true, 'type' => 'integer', ), 'title' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'The Document title.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'type' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Whether it is a document or folder.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'folder_id' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'A unique numeric ID for the parent Folder.', 'buddyboss' ), 'readonly' => true, 'type' => 'integer', ), 'group_id' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'A unique numeric ID for the Group.', 'buddyboss' ), 'readonly' => true, 'type' => 'integer', ), 'activity_id' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'A unique numeric ID for the activity.', 'buddyboss' ), 'readonly' => true, 'type' => 'integer', ), 'privacy' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Privacy of the document.', 'buddyboss' ), 'enum' => array( 'public', 'loggedin', 'onlyme', 'friends', 'grouponly' ), 'readonly' => true, 'type' => 'string', ), 'menu_order' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Order of the item.', 'buddyboss' ), 'readonly' => true, 'type' => 'integer', ), 'date_created' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'The date the document was created, in the site\'s timezone.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', 'format' => 'date-time', ), 'date_modified' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'The date the document was modified, in the site\'s timezone.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', 'format' => 'date-time', ), 'group_name' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Group name associate with the document.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'group_status' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Group status associate with the document.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'visibility' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Visibility of the document.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'download_url' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Download URL for the document.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'extension' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Document file extension.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'extension_description' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Document file description.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'svg_icon' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Document Icon based on the extension.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'filename' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Full name of the document file with extension.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'size' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Size of the uploaded document.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'msg_preview' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Message preview for the document.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'attachment_data' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Wordpress Document Data.', 'buddyboss' ), 'readonly' => true, 'type' => 'object', 'properties' => array( 'full' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Document URL with full image size.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'thumb' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Document URL with thumbnail image size.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'activity_thumb' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Document URL for the activity image size.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'meta' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'Meta items for the document.', 'buddyboss' ), 'readonly' => true, 'type' => 'object', ), ), ), 'user_nicename' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'The User\'s nice name to create a document.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'user_login' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'The User\'s login name to create a document.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), 'display_name' => array( 'context' => array( 'embed', 'view', 'edit' ), 'description' => __( 'The User\'s display name to create a document.', 'buddyboss' ), 'readonly' => true, 'type' => 'string', ), ), ); /** * Filters the document schema. * * @param array $schema The endpoint schema. */ return apply_filters( 'bp_rest_document_schema', $this->add_additional_fields_schema( $schema ) ); }

更新日志

更新日志
版本 描述
0.1.0 介绍了。

问题吗?

我们总是很乐意帮助您解决代码或其他问题!搜索我们的开发人员文档联络支持,或与我们联系销售团队