[wp-hackers] WP_DEBUG notice with current_user_can()?

Austin Matzko austin at ilfilosofo.com
Mon Apr 25 00:43:53 UTC 2011


On Sun, Apr 24, 2011 at 6:50 PM, Mike Schinkel
<mikeschinkel at newclarity.net> wrote:
> current_user_can('edit_page');
[snip]
> Am I doing something wrong, or is this indeed a oversight in core that I should submit a trac ticket and patch to fix?

I think you want current_user_can('edit_pages').  edit_page should
include the ID of the page in question, like so:

current_user_can( 'edit_page', $page_id )


More information about the wp-hackers mailing list