[wp-trac] [WordPress Trac] #57893: Remove the redundancy of adding row actions in `class-wp-media-list-table.php`

WordPress Trac noreply at wordpress.org
Tue Jun 20 11:22:57 UTC 2023


#57893: Remove the redundancy of adding row actions in `class-wp-media-list-
table.php`
-------------------------------------------------+-------------------------
 Reporter:  kebbet                               |       Owner:
                                                 |  SergeyBiryukov
     Type:  enhancement                          |      Status:  reviewing
 Priority:  normal                               |   Milestone:  6.3
Component:  Media                                |     Version:  3.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing has-         |     Focuses:  ui
  testing-info                                   |
-------------------------------------------------+-------------------------

Comment (by kebbet):

 Attached PR has been updated after a nice review by @costdev, thanks!

 It now skips my suggested introduction of a foreach loop, and adds the
 action directly to the `$actions` array after the conditional check for
 each action.

 It also now removes the `$delete_ays` variable which was only used once.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57893#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list