learndash_rest_courses_groups_query

apply_filters( 'learndash_rest_courses_groups_query',  array $args,  WP_REST_Request $request )

Filters the query arguments for courses group REST request.


Description #

Enables adding extra arguments or setting defaults for a post collection request.


Parameters #

$args

(array) An array of query arguments for getting courses groups.

$request

(WP_REST_Request) The REST request object.


Source #

File: includes/rest-api/v1/class-ld-rest-courses-groups-controller.php


Examples #

 <?php
/**
 * Example usage for learndash_rest_courses_groups_query filter.
 */
add_filter(
	'learndash_rest_courses_groups_query',
	function( $args, $request ) {
		// May add any custom logic using $args, $request.

		// Always return $args.
		return $args;
	},
	10,
	2
);
 

Changelog #

Changelog
Version Description
4.7.0 Introduced.