I have run into this problem where the following piece of code always returns true for any
post ID supplied to it.
Normally, the above code should return false when the user is not the author of the post or does not have the capability to delete others post. However, it still returns true for any post ID.
The user has been assigned a custom role, as defined below.
$standard_role_capabilities = array ('read' => true, 'delete_posts' => true, 'edit_posts' => true, 'delete_published_posts' => true, 'publish_posts' => true, 'edit_published_posts' => true, 'comment' => true ); add_role('standard', 'Standard', $standard_role_capabilities);
Any reasons for this not working?