[wp-trac] [WordPress Trac] #34015: Improve method documentation for WP_Nav_Menu_Widget

WordPress Trac noreply at wordpress.org
Sat Sep 26 17:36:50 UTC 2015


#34015: Improve method documentation for WP_Nav_Menu_Widget
----------------------------------------+------------------------------
 Reporter:  DrewAPicture                |       Owner:  leemon
     Type:  defect (bug)                |      Status:  assigned
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Widgets                     |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:  docs
----------------------------------------+------------------------------
Changes (by DrewAPicture):

 * owner:   => leemon
 * status:  new => assigned


Comment:

 Hi @leemon,

 Thanks for the patch!

 * For this particular widget, the class and methods were introduced in
 3.0.0, so that version should be used instead of 2.8.0

 Also, as mentioned in [comment:3:ticket:34027 #34027]:

 > Just a couple of notes:
 >
 > * Let's go with the vernacular of something like "the current {type}
 widget instance" instead of "a particular instance of a widget". Being
 general in the `WP_Widget` base class is fine, but in this context, we can
 be more specific. For example:
 >
 > {{{
 >  * Handles updating settings for the current Text widget instance.
 > }}}
 >
 > * Notice I inserted the type of widget, in this case "Text", and more
 specifically mentioned updating the ''settings'' which is what the
 `update()` method does.
 > * The same sort of advice goes along with any other method in the class.
 The idea is to avoid simple copy pasta and actually get specific :-)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34015#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list