BP_REST_Messages_Endpoint::get_search_recipients_items_schema()

Get the search recipients schema, conforming to JSON Schema.

Description

Return

(array)

Source

File: bp-messages/classes/class-bp-rest-messages-endpoint.php

2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
public function get_search_recipients_items_schema() {
    $schema = array(
        '$schema'    => 'http://json-schema.org/draft-04/schema#',
        'title'      => 'bp_search_recipients',
        'type'       => 'object',
        'properties' => array(
            'id'         => array(
                'context'     => array( 'view', 'edit' ),
                'description' => __( 'A unique numeric ID for user.', 'buddyboss' ),
                'type'        => 'integer',
            ),
            'userhandle' => array(
                'context'     => array( 'view', 'edit' ),
                'description' => __( 'User\'s nickname as handle.', 'buddyboss' ),
                'type'        => 'string',
            ),
            'text'       => array(
                'context'     => array( 'view', 'edit' ),
                'description' => __( 'Display Name for the user.', 'buddyboss' ),
                'readonly'    => true,
                'type'        => 'string',
            ),
        ),
    );
 
    /**
     * Filters the message search recipients schema.
     *
     * @since 0.1.0
     *
     * @param array $schema The endpoint schema.
     */
    return apply_filters( 'bp_rest_message_search_recipients_schema', $this->add_additional_fields_schema( $schema ) );
}

Changelog

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.