learndash-rest-api-controllers

apply_filters( 'learndash-rest-api-controllers',  array $controllers )

Filters the list of REST API controllers.


Description #


Parameters #

$controllers

(array) An array of REST API controllers data.


Source #

File: includes/rest-api/class-ld-rest-api.php


Examples #

 <?php
/**
 * Example usage for learndash-rest-api-controllers filter.
 */
add_filter(
	'learndash-rest-api-controllers',
	function( $controllers ) {
		// May add any custom logic using $controllers.

		// Always return $controllers.
		return $controllers;
	}
);