BP_REST_Mention_Endpoint::get_collection_params()

Get the query params for collections.

Description

Return

(array)

Source

File: bp-core/classes/class-bp-rest-mention-endpoint.php

	public function get_collection_params() {
		$params = array(
			'term'         => array(
				'description'       => __( 'Members @name suggestions.', 'buddyboss' ),
				'required'          => true,
				'type'              => 'string',
				'sanitize_callback' => 'sanitize_text_field',
				'validate_callback' => 'rest_validate_request_arg',
			),
			'only_friends' => array(
				'description'       => __( 'Limit result set to Friends only.', 'buddyboss' ),
				'type'              => 'boolean',
				'sanitize_callback' => 'rest_sanitize_boolean',
				'validate_callback' => 'rest_validate_request_arg',
			),
			'group_id'     => array(
				'description'       => __( 'A unique numeric ID for the Group. Limit result set to the group.', 'buddyboss' ),
				'type'              => 'integer',
				'sanitize_callback' => 'sanitize_text_field',
				'validate_callback' => 'rest_validate_request_arg',
			),
		);

		/**
		 * Filters the collection query params.
		 *
		 * @param array $params Query params.
		 */
		return apply_filters( 'bp_rest_mention_collection_params', $params );
	}

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.