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.


  • $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