[Bb-trac] Re: [bbPress] #670: Activating plugins that rewrite pluggable functions fails.

bbPress bb-trac at lists.bbpress.org
Fri Jun 22 06:15:59 GMT 2007


#670: Activating plugins that rewrite pluggable functions fails.
----------------------------+-----------------------------------------------
 Reporter:  sambauers       |        Owner:                   
     Type:  defect          |       Status:  new              
 Priority:  high            |    Milestone:  0.8.3 & XML-RPC  
Component:  Administration  |      Version:  1.0-alpha (trunk)
 Severity:  major           |   Resolution:                   
 Keywords:                  |  
----------------------------+-----------------------------------------------
Comment (by mdawaffe):

 An interesting situation.  As you mention, you can define your pluggable
 functions conditionally (this is what I've seen done for WordPress
 plugins).  You can also prefix the file name with an underscore.

 Neither is perfect.

 I'm pretty sure we can't do the "does this plugin generate a fatal error"
 check any earlier than we do.  We'd have to do it before pluggable.php was
 loaded, which means doing it before we can check nonces or do redirects.

 I can't think of any solution which isn't complicated and difficult to
 secure.

 The best solution may simply be to encourage plugin authors to use
 conditional statements?

 I guess we could do something like:

 {{{
 bb_register_pluggable_function( 'bb_auth', 'my_version_of_bb_auth' );
 }}}

 But that seems more complicated to plugin authors than {{{if (
 !function_exists( 'bb_auth' ) )}}} and would certainly complicate the code
 base.

 What are your thoughts?

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


More information about the Bb-trac mailing list