[wp-trac] [WordPress Trac] #19203: Fixed a couple of function descriptions in wp-includes/plugin.php

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 8 05:53:55 UTC 2011


#19203: Fixed a couple of function descriptions in wp-includes/plugin.php
--------------------------+-----------------------------
 Reporter:  amereservant  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Inline Docs   |    Version:  3.3
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------------
 There were a couple of errors I found in the function docblocks while
 tinkering in the plugins.php file as well as a confusing example, so
 here's what I fixed:

 '''add_filter()''':
 It mentioned filters were for modifying "strings", which isn't correct
 since you can also use filters to modify arrays, etc., so I changed the
 docblock to reflect this.
 I also changed the example code to {{{ var_dump($example); }}} instead of
 {{{ echo $example; }}} since echoing arrays/objects etc. will cause an
 error.

 '''apply_filters()''':
 The example code block was confusing since it specified a filter function,
 but didn't show it being added and then just called apply_filters(), which
 I didn't notice the relation at first.
 I added the {{{add_filter()}}} function in the code example for a clearer
 example so the reader will better understand the usage of this function.

 '''_wp_call_all_hook()''':
 A mysterious '''$hook''' parameter was defined in the docblock, however
 the parameter simply doesn't exist.  Not sure if this was a passing
 thought or someone falling asleep while writing it, but I've removed it
 from the docblock.

 Thanks!

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19203>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list