• It seems the default for delete comments if you are not an admin is that are on your own post.

    I’m trying to give the users the capability of deleting comments to their posts or comments they’ve posted.

    Riddled throughout the code is check_admin_referer. I’ve been tracing through the code and haven’t found the right place to edit.

    I’ve found the check_admin_referer and it calls do_action(‘check_admin_referer’, ‘delete-comments’, $result). I’m found the do action code, but the actual processing of whether or not a user can delete-comments is not their either.

    Does anyone know where the actual code for check_admin_referer(‘delete-comments’) is?

    Where can I put something like if ($user_identity == get_comment_author() || is_admin) return true.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mmwaldman

    (@mmwaldman)

    Here’s what happened. I added a bunch of roles to contributor. They all worked except moderate_comments.

    Thread Starter mmwaldman

    (@mmwaldman)

    I wound up having to edit the editor role. Adding moderate_comments to that role worked.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Delete your own comments’ is closed to new replies.