Post Meta Data: How does it work?
-
I’m Designing a post type with 3 membership levels:
Master, Member and Viewer.
The Master can manipulate the post content in the database, the Member has restricted access and the Viewer has read-only access.
I’m adding the information by the way of meta data:
update_post_meta( $post_id, '_membership', array('master'=$userID) );
What I want is to be able to tell what level of access the current user has. Obviously the ‘master’ will have only a few entries, the ‘member’ will have a lot more and the ‘viewer’ will have loads more still.
The problem is that the documentation suggests that updating the meta data will overwrite all the values in the array.
What would be the best way of handling this?
- The topic ‘Post Meta Data: How does it work?’ is closed to new replies.