latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Access ccap for a page or post

Home Forums Community Forum Access ccap for a page or post

Tagged: 

This topic contains 2 replies, has 2 voices. Last updated by  Jean Theurkauf 3 years, 5 months ago.

Topic Author Topic
Posted: Tuesday Jul 23rd, 2013 at 10:46 am #53884

How do you access the ccap for a specific page or post via php?

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Wednesday Jul 24th, 2013 at 4:50 am #53963
Bruce
Username: Bruce
Staff Member

How do you access the ccap for a specific page or post via php?

I’m sorry I’m not sure I fully understand the question. Are you looking to find what Custom Capabilities or Membership Levels a Post/Page is protected with? If so, this function lets you do that:

http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_is_post_protected_by_s2member()

If the Post/Page is not protected by s2Member, the function will return FALSE, otherwise it will return an array of protections on the Post/Page. You can see the format of this array in the docs.

Posted: Wednesday Jul 24th, 2013 at 6:28 am #53981

Hi Bruce!

That looks just like what I need.

Thank you so much.

Jean

Viewing 2 replies - 1 through 2 (of 2 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.