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

bbPress bb-trac at lists.bbpress.org
Thu Apr 24 02:19:11 GMT 2008


#791: proposal to allow admin menu function as seperate plugins to reduce
footprint
-------------------------+--------------------------------------------------
 Reporter:  _ck_         |        Owner:                    
     Type:  enhancement  |       Status:  closed            
 Priority:  normal       |    Milestone:  1.0-beta & XML-RPC
Component:  Back-end     |      Version:                    
 Severity:  normal       |   Resolution:  wontfix           
 Keywords:               |  
-------------------------+--------------------------------------------------
Changes (by sambauers):

  * status:  new => closed
  * resolution:  => wontfix

Comment:

 This can be achieved by putting all the admin specific code after these
 lines in the plugin.

 {{{
 if (!BB_IS_ADMIN) {
         return;
 }
 }}}

 This will return the included plugin file before the admin code is hit.

 If you wanted to go even further you could put admin code into a separate
 file and do this...

 {{{
 if (!BB_IS_ADMIN) {
         return;
 }

 include('pluginname-admin.php');
 }}}

 If you wanted an admin only function then you could just build a "stub"
 plugin that only had those lines in it.

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


More information about the Bb-trac mailing list