rcp_has_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/

rcp_has_post_restrictions( $post_id )

This function checks if a given post has any restrictions applied via the meta box on the Edit Post page. Unlike rcp_is_restricted_content(), which checks all restrictions (including term restrictions), this function only checks the settings in the post's "Restrict this content" meta box.

Parameters:

  • $post_id - ID of the post you'd like to check.

Return values:

  • true if the post has restrictions added.
  • false if the post does not have any restrictions.
Powered by Zendesk