[wp-trac] [WordPress Trac] #44850: correct DocBlock for set-screen-option filter

WordPress Trac noreply at wordpress.org
Mon Aug 27 19:54:05 UTC 2018


#44850: correct DocBlock for set-screen-option filter
--------------------------+-------------------------
 Reporter:  pbiron        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  5.0
Component:  General       |    Version:
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:  docs          |
--------------------------+-------------------------
 This is a follow-up to #26186.

 The first param in the DocBLock in the patch committed in r27379 is
 incorrect, in a couple of ways:

 1. the param type should be `bool`
 1. the param name should be something like `$keep` (see below)
 1. the param description should be something like `Whether to keep or skip
 saving the screen option value.  Default false.`

 The fact that the incorrect name `$value` is also the name of another one
 of the params causes `phpdoc-parser` to skip outputting the param
 altogether in the Code Reference:
 https://developer.wordpress.org/reference/hooks/set-screen-option/ (caused
 me a few minutes of grief wondering why my screen options weren't being
 saved).

 Related: #42505

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44850>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list