[wp-trac] [WordPress Trac] #55616: Helper function to unhook class methods

WordPress Trac noreply at wordpress.org
Mon Apr 25 13:12:13 UTC 2022

#55616: Helper function to unhook class methods
 Reporter:  johnjamesjacoby  |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Plugins          |    Version:
 Severity:  normal           |   Keywords:  2nd-opinion
  Focuses:                   |
 Problem: it’s pretty common (even if it’s not polite) for plugins to use a
 class constructor to hook their own public methods into things, but doing
 so makes it ''near-impossible'' to unhook procedurally.

 Solution: I just ran across the following function on StackExchange, and
 imagined something similar could be quite useful to have globally


 It’s gnarly, but it works, and I think having WordPress core include this
 functionality makes more sense than having plugin authors all include
 their own version of it.

Ticket URL: <https://core.trac.wordpress.org/ticket/55616>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list