File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -683,9 +683,15 @@ Feature: Manage WordPress plugins
683683 """
684684 <?php
685685 // Plugin Name: Test mu-plugin
686+ // Description: Test mu-plugin description
686687 """
687688
688689 When I run `wp plugin list --fields=name,title`
689690 Then STDOUT should be a table containing rows:
690691 | name | title |
691692 | test -mu | Test mu -plugin |
693+
694+ When I run `wp plugin list --fields=name,title,description`
695+ Then STDOUT should be a table containing rows:
696+ | name | title | description |
697+ | test | Test mu -plugin | Test mu -plugin description |
Original file line number Diff line number Diff line change @@ -239,6 +239,11 @@ protected function get_all_items() {
239239 $ mu_title = $ mu_plugin ['Title ' ];
240240 }
241241
242+ $ mu_description = '' ;
243+ if ( ! empty ( $ mu_plugin ['Description ' ] ) ) {
244+ $ mu_description = $ mu_plugin ['Description ' ];
245+ }
246+
242247 $ items [ $ file ] = array (
243248 'name ' => Utils \get_plugin_name ( $ file ),
244249 'status ' => 'must-use ' ,
@@ -248,7 +253,7 @@ protected function get_all_items() {
248253 'version ' => $ mu_version ,
249254 'update_id ' => '' ,
250255 'title ' => $ mu_title ,
251- 'description ' => '' ,
256+ 'description ' => $ mu_description ,
252257 'file ' => $ file ,
253258 );
254259 }
You can’t perform that action at this time.
0 commit comments