[Bb-trac] [bbPress] #791: proposal to allow admin menu function as seperate plugins to reduce footprint

bbPress bb-trac at lists.bbpress.org
Wed Feb 20 17:54:41 GMT 2008


#791: proposal to allow admin menu function as seperate plugins to reduce
footprint
-------------------------+--------------------------------------------------
 Reporter:  _ck_         |       Owner:     
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:     
Component:  Back-end     |     Version:     
 Severity:  normal       |    Keywords:     
-------------------------+--------------------------------------------------
 I've been brainstorming on how to reduce bbPress's half meg footprint
 (when several plugins are included) and it occurs to me that it would help
 if plugin authors had the option to make admin functions external which
 would only load when the admin menu was active, that might shave at least
 100k off the core in memory for regular users.

 Since auto-load plugins use _plugin.php why not come up with a backwards
 compatible standard for bbpress (and perhaps wordpress someday) for admin
 plugins?  ie.   admin_plugin.php

 This would be backward compatible because either a plugin header would be
 put in the file by the author and older bbpress would load it anyway - or
 future versions would know to only load it at admin menu time. Optionally
 there could also be  _admin_plugin.php for auto-load admin plugins - still
 backward compatible.

 Or authors could leave off the header and test if the admin menu plugin
 loader exists with function_exists, and if not, just substitute their own
 bb_init call to see if they are in the admin menu via the admin constant
 and just do an include.

 So for example my bb-polls.php plugin would come with a second file
 admin_bb-polls.php  OR a plugin that's only for admin use like mass-
 edit.php would be simply renamed admin_mass-edit.php

-- 
Ticket URL: <http://trac.bbpress.org/ticket/791>
bbPress <http://bbpress.org/>
Innovative forum development


More information about the Bb-trac mailing list