Make WordPress Core

#57120 closed defect (bug) (duplicate)

current_user_can( 'delete_post' ) function not working anymore

Reported by: taadike's profile taadike Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.1
Component: Role/Capability Keywords:
Focuses: Cc:


After updating WordPress to the latest version, this function does not return TRUE anymore:
if( current_user_can( 'delete_post' ) )

Please fix.

Change History (2)

#1 @SergeyBiryukov
19 months ago

  • Component changed from General to Role/Capability
  • Summary changed from function not working anymore to current_user_can( 'delete_post' ) function not working anymore
  • Version set to 6.1

Hi there, welcome to WordPress Trac! Thanks for the report.

Just noting that this seems similar to #56962, the discussion in that ticket might be helpful.

#2 @SergeyBiryukov
19 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Going to close as a duplicate of #56962, which has some more details, to keep the discussion in one place.

Note: See TracTickets for help on using tickets.