#34015 closed defect (bug) (fixed)
Improve method documentation for WP_Nav_Menu_Widget
Reported by: | DrewAPicture | Owned by: | leemon |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Widgets | Keywords: | good-first-bug has-patch |
Focuses: | docs | Cc: |
Description
Note: This is part of the effort in #34013 to improve method documentation to all core widget classes
Class: WP_Nav_Menu_Widget
File: wp-includes/widgets/class-wp-nav-menu-widget.php
Attachments (3)
Change History (9)
#1
@
9 years ago
- Summary changed from Improve method documentation for `WP_Nav_Menu_Widget` to Improve method documentation for WP_Nav_Menu_Widget
#2
@
9 years ago
Added patch to improve the method docs for the widget()
, update()
, form()
, and __construct()
methods in the WP_Nav_Menu_Widget
class.
#3
@
9 years ago
- Owner set to leemon
- Status changed from new to assigned
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 #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 :-)
Note: See
TracTickets for help on using
tickets.
Improve method documentation