Opened 11 years ago
Closed 11 years ago
#34025 closed defect (bug) (fixed)
Improve method documentation for WP_Widget_Search
| Reported by: | DrewAPicture | Owned by: | leemon |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Widgets | Version: | |
| Severity: | normal | Keywords: | good-first-bug has-patch |
| Cc: | Focuses: | docs |
Description
Note: This is part of the effort in #34013 to improve method documentation to all core widget classes
Class: WP_Widget_Search
File: wp-includes/widgets/class-wp-widget-search.php
Attachments (2)
Change History (7)
#2
@
11 years ago
Added patch to improve the method docs for the widget(), update(), form(), and __construct() methods in the WP_Widget_Search class.
#3
@
11 years ago
- Keywords needs-patch added; has-patch removed
- Owner set to
- Status new → assigned
Hi @leemon,
Thanks for the patch!
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_Widgetbase 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Improve method documentation