[wp-trac] [WordPress Trac] #20311: Docblock error for wp_unique_filename

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 29 15:11:26 UTC 2012


#20311: Docblock error for wp_unique_filename
-------------------------+----------------------
 Reporter:  transom      |       Owner:
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  Inline Docs  |     Version:  3.4
 Severity:  trivial      |  Resolution:  invalid
 Keywords:  has-patch    |
-------------------------+----------------------
Changes (by nacin):

 * keywords:  has-patch commit => has-patch
 * status:  new => closed
 * resolution:   => invalid
 * milestone:  3.5 =>


Comment:

 The documentation itself appears wrong.

 {{{
  * The callback is passed three parameters, the first one is the
 directory, the
  * second is the filename, and the third is an optional supplied callback
  * to generate a unique filename.
 }}}

 This paragraph is not talking about the function, whose third argument is
 indeed the optional supplied callback. This is talking about how the
 supplied callback gets called. As you can see, the third argument is
 indeed the extension:

 {{{
 call_user_func( $unique_filename_callback, $dir, $name, $ext );
 }}}

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


More information about the wp-trac mailing list