[wp-trac] Re: [WordPress Trac] #8833: extract pluggable.php function logic into separate functions

WordPress Trac wp-trac at lists.automattic.com
Sat Apr 25 13:18:06 GMT 2009


#8833: extract pluggable.php function logic into separate functions
-------------------------+--------------------------------------------------
 Reporter:  wnorris      |       Owner:  Viper007Bond           
     Type:  enhancement  |      Status:  new                    
 Priority:  normal       |   Milestone:  2.8                    
Component:  Plugins      |     Version:  2.8                    
 Severity:  normal       |    Keywords:  has-patch needs-testing
-------------------------+--------------------------------------------------

Comment(by Viper007Bond):

 A summary of my patch:

 1. I took the original function (along with all of it's phpDocs) and
 copy/pasted it into another file.

 2. Prefixed the new function name with an underscore and changed `@since`
 to `2.8.0` since it's a new function.

 3. Added the following after all of the description and before the
 `@since`:

 {{{
  * This function should not be used directly. Use the pluggable version
 instead.
  * @see pluggable_function()
 }}}

 4. Went back to the original function in `pluggable.php` and stripped out
 it's contents, replacing it with the new internal function.

 5. Removed any `@uses` since the pluggable function no longer actually
 used them (they're still over with the new internal function though). Also
 removed any description bits specific to that implementation of the plugin
 function but that weren't generic descriptors of what the function should
 do.

 6. Added the following after the description and before `@since`:

 {{{
  * @see _pluggable_function()
 }}}

 Note I did not add a `@uses _pluggable_function()` which is one of my
 questions (is that needed in addition to or instead of the `@uses`?).

 Please leave any and all feedback.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/8833#comment:9>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list