llms_rest_validate_courses( int|int[] $courses, boolean $allow_empty = false )

Validate submitted array of integers is an array of real courses id, or empty.


Parameters Parameters

$courses

(int|int[]) (Required) Array of courses id.

$allow_empty

(boolean) (Optional) Whether or not allowing empty lists.

Default value: false


Top ↑

Return Return

(boolean)


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/server/llms-rest-server-functions.php

function llms_rest_validate_courses( $courses, $allow_empty = false ) {
	return llms_rest_validate_post_types( $courses, 'course', $allow_empty );
}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.18 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.