[wp-hackers] Filter dashboard custom post listing by user

fris fris at fris.net
Thu Jan 12 03:34:43 UTC 2012

Try pre_get_posts

-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Mario Peshev
Sent: Wednesday, January 11, 2012 4:22 PM
To: wp-hackers at lists.automattic.com
Subject: [wp-hackers] Filter dashboard custom post listing by user

Hello everyone,

Did some research, but I was unable to implement it after all.

I have a custom post type accessible only by a new role. I want to filter
the post type listing so that each user should see only his records (as
Author users can see their posts only). I've tried to filter parse_query but
it works for the main listing only (still I can see other records).

Which is the correct filter to use in order to prevent malicious users to
list others' records?

Mario Peshev
Training and Consulting Services @ DevriX http://www.linkedin.com/in/mpeshev
wp-hackers mailing list
wp-hackers at lists.automattic.com

More information about the wp-hackers mailing list