BP_REST_Activity_Details_Endpoint::get_item_schema()
Get the plugin schema, conforming to JSON Schema.
Description
Return
(array)
Source
File: bp-activity/classes/class-bp-rest-activity-details-endpoint.php
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | public function get_item_schema() { $schema = array ( 'title' => 'bp_activity_details' , 'type' => 'object' , 'properties' => array ( 'nav' => array ( 'context' => array ( 'embed' , 'view' ), 'description' => __( 'Activity directory tabs.' , 'buddyboss' ), 'type' => 'object' , 'readonly' => true, 'items' => array ( 'type' => 'array' , ), ), 'filters' => array ( 'context' => array ( 'embed' , 'view' ), 'description' => __( 'Activity Filter options' , 'buddyboss' ), 'type' => 'array' , 'readonly' => true, ), 'post_in' => array ( 'context' => array ( 'embed' , 'view' ), 'description' => __( 'Activity contains from.' , 'buddyboss' ), 'type' => 'array' , 'readonly' => true, ), ), ); if ( function_exists( 'bp_activity_get_visibility_levels' ) ) { $schema [ 'properties' ][ 'privacy' ] = array ( 'context' => array ( 'embed' , 'view' ), 'description' => __( 'Activity Privacy.' , 'buddyboss' ), 'type' => 'array' , 'readonly' => true, ); } /** * Filters the activity details schema. * * @param string $schema The endpoint schema. */ return apply_filters( 'bp_rest_activity_details_schema' , $this ->add_additional_fields_schema( $schema ) ); } |
Changelog
Version | Description |
---|---|
0.1.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.