llms_rest_validate_memberships( int|int[] $memberships, boolean $allow_empty = false )

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


Parameters Parameters

$memberships

(int|int[]) (Required) Array of memberships 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_memberships( $memberships, $allow_empty = false ) {
	return llms_rest_validate_post_types( $memberships, 'llms_membership', $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.