Change WordPress user roles and capabilities Forums How to or FAQ Is there a API to control content view restrictions ?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3554
    Richard Plaza
    Participant

    Hi Vladimir,
    I have a problem with content view restrictions:

    I have a plugin called “Encyclopedia” with post-type “encyclopedia” and created a single-encyclopedia.php file in which i want to show the users the revisions as list and give them the possibility to compare the revisions via wp_text_diff()-function.
    So i have a menue via ul/li with one (default) tab that shows the post (if restricted than it shows “not allowed…”) and then i have a tab with revisions that i call with wp_get_post_revisions() and there are no restrictions so all content is displayed!

    Is it possible to use a API so that i can check if content should be displayed ?

    Thanks for your help and greetings from bavaria
    Richard

    #3557
    Vladimir
    Keymaster

    Hi Richard,

    Your question came in time. I discovered that I need something similar myself to get a data about restricted posts from other add-on: I plan to hide front-end menu items linked to the prohibited pages. So I may find something suitable in an existing code or write publicly available function especially for this purpose. I will contact you in 2-3 days.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.