[wp-trac] [WordPress Trac] #57887: The WordPress core does not support calling non-static methods for hook filters and actions within a namespace

WordPress Trac noreply at wordpress.org
Wed Mar 8 17:52:48 UTC 2023


#57887: The WordPress core does not support calling non-static methods for hook
filters and actions within a namespace
-------------------------------+-----------------------
 Reporter:  markcarbonell2013  |       Owner:  (none)
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  General            |     Version:
 Severity:  normal             |  Resolution:  invalid
 Keywords:                     |     Focuses:  rest-api
-------------------------------+-----------------------
Changes (by knutsp):

 * keywords:  close =>
 * focuses:  rest-api, coding-standards => rest-api


Comment:

 I actually tested the code in a simple test plugin. Result on error log:
 {{{
 [08-Mar-2023 17:48:49 UTC] If you read this, calling do_something_static
 worked
 [08-Mar-2023 17:48:49 UTC] If you read this, calling
 do_something_non_static worked
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57887#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list