Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Determine user right

UserPost

7:07 am
June 8, 2011


lammspillnin

New Member

posts 1

1

I'm trying to integrate role scope in another plugin (Collapsing pages) to only write out the menu items that users have rights to read by role scope. I'm stucked where I need to define if the user have rights or not. Is there a good way to determine this?


foreach( $pages as $page ) {
if( the user have rights to read this post )
continue;  


add to menu
… 
}

8:17 am
June 9, 2011


Kevin

Admin

posts 2503

2
if ( current_user_can( 'read_page', $page_id ) ) { // your menu UI code }

About the Agapetry forum

Currently Online:

15 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1246

Posts: 5654

Members:

There are 1257 members

There are 1 guests


Kevin has made 2503 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin