File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -170,21 +170,11 @@ public function check_update( $args, $assoc_args ) {
170170 // Filter to only themes with available updates
171171 $ items_with_updates = array_filter (
172172 $ items ,
173- function ( $ item ) {
174- return 'available ' === $ item ['update ' ];
173+ function ( $ item ) use ( $ args ) {
174+ return in_array ( $ item [ ' name ' ], $ args , true ) && 'available ' === $ item ['update ' ];
175175 }
176176 );
177177
178- // If specific themes requested, filter to those
179- if ( ! empty ( $ args ) ) {
180- $ items_with_updates = array_filter (
181- $ items_with_updates ,
182- function ( $ item ) use ( $ args ) {
183- return in_array ( $ item ['name ' ], $ args , true );
184- }
185- );
186- }
187-
188178 if ( empty ( $ items_with_updates ) ) {
189179 WP_CLI ::success ( 'All themes are up to date. ' );
190180 return ;
You can’t perform that action at this time.
0 commit comments