Skip to content

Commit fecc69a

Browse files
committed
Convert widget subcommand help summaries (and other method DocBlock summaries) to use third-person singular verbs.
1 parent b1ee26f commit fecc69a

2 files changed

Lines changed: 18 additions & 19 deletions

File tree

src/Sidebar_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Sidebar_Command extends WP_CLI_Command {
2222
);
2323

2424
/**
25-
* List registered sidebars.
25+
* Lists registered sidebars.
2626
*
2727
* ## OPTIONS
2828
*

src/Widget_Command.php

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
* $ wp widget delete calendar-2 archive-1
3131
* Success: 2 widgets removed from sidebar.
3232
*/
33-
3433
class Widget_Command extends WP_CLI_Command {
3534

3635
private $fields = array(
@@ -41,7 +40,7 @@ class Widget_Command extends WP_CLI_Command {
4140
);
4241

4342
/**
44-
* List widgets associated with a sidebar.
43+
* Lists widgets associated with a sidebar.
4544
*
4645
* ## OPTIONS
4746
*
@@ -102,7 +101,7 @@ public function list_( $args, $assoc_args ) {
102101
}
103102

104103
/**
105-
* Add a widget to a sidebar.
104+
* Adds a widget to a sidebar.
106105
*
107106
* Creates a new widget entry in the database, and associates it with the
108107
* sidebar.
@@ -139,7 +138,7 @@ public function add( $args, $assoc_args ) {
139138
WP_CLI::error( "Invalid widget type." );
140139
}
141140

142-
/**
141+
/*
143142
* Adding a widget is as easy as:
144143
* 1. Creating a new widget option
145144
* 2. Adding the widget to the sidebar
@@ -165,7 +164,7 @@ public function add( $args, $assoc_args ) {
165164
}
166165

167166
/**
168-
* Update options for an existing widget.
167+
* Updates options for an existing widget.
169168
*
170169
* ## OPTIONS
171170
*
@@ -206,7 +205,7 @@ public function update( $args, $assoc_args ) {
206205
}
207206

208207
/**
209-
* Move the position of a widget.
208+
* Moves the position of a widget.
210209
*
211210
* Changes the order of a widget in its existing sidebar, or moves it to a
212211
* new sidebar.
@@ -264,7 +263,7 @@ public function move( $args, $assoc_args ) {
264263
}
265264

266265
/**
267-
* Deactivate one or more widgets from an active sidebar.
266+
* Deactivates one or more widgets from an active sidebar.
268267
*
269268
* Moves widgets to Inactive Widgets.
270269
*
@@ -308,7 +307,7 @@ public function deactivate( $args, $assoc_args ) {
308307
}
309308

310309
/**
311-
* Delete one or more widgets from a sidebar.
310+
* Deletes one or more widgets from a sidebar.
312311
*
313312
* ## OPTIONS
314313
*
@@ -353,7 +352,7 @@ public function delete( $args, $assoc_args ) {
353352
}
354353

355354
/**
356-
* Reset sidebar.
355+
* Resets sidebar.
357356
*
358357
* Removes all widgets from the sidebar and places them in Inactive Widgets.
359358
*
@@ -435,7 +434,7 @@ public function reset( $args, $assoc_args ) {
435434
}
436435

437436
/**
438-
* Check whether a sidebar is a valid sidebar
437+
* Checks whether a sidebar is a valid sidebar
439438
*
440439
* @param string $sidebar_id
441440
*/
@@ -450,7 +449,7 @@ private function validate_sidebar( $sidebar_id ) {
450449
}
451450

452451
/**
453-
* Check whether the specified widget is on the sidebar
452+
* Checks whether the specified widget is on the sidebar
454453
*
455454
* @param string $widget_id
456455
*/
@@ -471,7 +470,7 @@ private function validate_sidebar_widget( $widget_id ) {
471470
}
472471

473472
/**
474-
* Get the widgets (and their associated data) for a given sidebar
473+
* Gets the widgets (and their associated data) for a given sidebar
475474
*
476475
* @param string $sidebar_id
477476
* @return array
@@ -520,7 +519,7 @@ private function wp_get_sidebars_widgets() {
520519
}
521520

522521
/**
523-
* Get the widget's name, option index, sidebar, and sidebar index from its ID
522+
* Gets the widget's name, option index, sidebar, and sidebar index from its ID
524523
*
525524
* @param string $widget_id
526525
* @return array
@@ -548,7 +547,7 @@ private function get_widget_data( $widget_id ) {
548547
}
549548

550549
/**
551-
* Get the options for a given widget
550+
* Gets the options for a given widget
552551
*
553552
* @param string $name
554553
* @return array
@@ -558,7 +557,7 @@ private function get_widget_options( $name ) {
558557
}
559558

560559
/**
561-
* Update the options for a given widget
560+
* Updates the options for a given widget
562561
*
563562
* @param string $name
564563
* @param mixed
@@ -568,7 +567,7 @@ private function update_widget_options( $name, $value ) {
568567
}
569568

570569
/**
571-
* Reposition a widget within a sidebar or move to another sidebar.
570+
* Repositions a widget within a sidebar or move to another sidebar.
572571
*
573572
* @param string $widget_id
574573
* @param string|null $current_sidebar_id
@@ -614,7 +613,7 @@ private function move_sidebar_widget( $widget_id, $current_sidebar_id, $new_side
614613
}
615614

616615
/**
617-
* Get a widget's instantiated object based on its name
616+
* Gets a widget's instantiated object based on its name
618617
*
619618
* @param string $id_base Name of the widget
620619
* @return WP_Widget|false
@@ -631,7 +630,7 @@ private function get_widget_obj( $id_base ) {
631630
}
632631

633632
/**
634-
* Clean up a widget's options based on its update callback
633+
* Cleans up a widget's options based on its update callback
635634
*
636635
* @param string $id_base Name of the widget
637636
* @param mixed $dirty_options

0 commit comments

Comments
 (0)