[wp-trac] [WordPress Trac] #33413: most PHP classes should be in their own file

WordPress Trac noreply at wordpress.org
Tue Nov 24 00:02:36 UTC 2015


#33413: most PHP classes should be in their own file
----------------------------+-----------------------------
 Reporter:  wonderboymusic  |       Owner:  wonderboymusic
     Type:  enhancement     |      Status:  reopened
 Priority:  normal          |   Milestone:  4.4
Component:  General         |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:  dev-feedback    |     Focuses:
----------------------------+-----------------------------

Comment (by dd32):

 It sounds like in this case, the plugin is `_doing_it_wrong()`. No plugin
 should need to require a core file manually, either it's for use within
 the admin and should include the plugins file on `admin_init`, or it's for
 use on the front end, and should either a) file a ticket to move it to
 `wp-includes` and always load, or b) copy the core functionality needed to
 their own file.

 In this case, `Walker_Category_Checklist` is a very minimal class, I'd
 suggest the proper way would be to just copy the minimal required
 functionality into your own Walker class.

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


More information about the wp-trac mailing list