Skip to:
Content
Pages
Categories
Search
Top
Bottom

current_user_can Issue


  • ttyler333
    Participant

    @ttyler333

    I have been trying to enable the ability for the author to delete their own posts. I am running bbPress 2.5.3-5249 and based on my analysis current_user_can("delete_reply", $post->ID); seems to be the problem, I created a capability “delete_reply” and still didn’t succeed. I read documentation but it said delete_replies. I have spent too much time on this one thing. I can make the bbpress work so the user can delete their own posts but it’d be after modifying files I really should only have to hook into. Anyone have any advice or tips?

Viewing 1 replies (of 1 total)

  • ttyler333
    Participant

    @ttyler333

    There was a lack of help from the community but I figured out a way to hook into bbpress’s admin links “bbp_get_reply_admin_links” from there Basically exploded the $content and put my link inside, imploded and had to write some new request handling, check permissions beyond what “current_user_can” can do. From there wamm bamm boom everything works.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.