[wp-trac] [WordPress Trac] #50870: Auto-update counts do not update when bulk deleting

WordPress Trac noreply at wordpress.org
Tue Nov 10 19:41:28 UTC 2020


#50870: Auto-update counts do not update when bulk deleting
-------------------------------------------------+-------------------------
 Reporter:  desrosj                              |       Owner:  audrasjb
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  5.6
Component:  Plugins                              |     Version:  5.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-screenshots needs-     |     Focuses:
  testing                                        |  administration
-------------------------------------------------+-------------------------

Comment (by pbiron):

 [attachment:"50870.3.diff"] fixes the identified by @hellofromTonya above.

 When putting [attachment:"50870.2.diff"] together I didn't realize that
 `$totals` was a global...I thought it was only used in the call to
 `wp_localize_script()`.

 The difference between `$totals` and the new `$js_themes` is that
 `$totals` contains counts of themes in each status, whereas `$js_themes`
 contains the theme slugs in each status.  The later is needed in the
 modified JS (`wp-admin/js/updates.js`) to know which counts should be
 updated in the views when a theme with a specific slug is deleted.

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


More information about the wp-trac mailing list