rcp_get_post_restrictions()

Note: This is part of the developer docs and is considered custom code.
Unfortunately, we cannot provide support for custom code at this time as we do not have the additional resources that would be necessary to provide support for custom code. 

If you need assistance with this, please reach out to our list of consultants for further assistance:
https://codeable.io/developers/restrict-content-pro/

Returns an array of membership requirements/restrictions for an individual post. If the post has individual restrictions applied, then those will be returned. If not, then the global post type restrictions are checked and returned. Note this function does not return associated term restrictions; those must be retrieved separately with rcp_get_term_restrictions().

Parameters:

  • $post_id (int) - ID of the post to check.

Return values:

  • array
    • membership_levels (string|array) - Can be a string "any-paid", "any", or array of membership level IDs.
    • access_level (int) - Access level required.
    • user_level (array) - Array of required user role(s).
Powered by Zendesk