mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Upgrade/Install: Update available theme updates count when a theme si deleted.
This changeset fixes an issue where the available theme updates count was not updated after a theme is deleted. Props nazmulhasan103, riccardodicurti, sabernhardt, ironprogrammer, costdev, robinwpdeveloper, rahmantasnia. Fixes #57183. Built from https://develop.svn.wordpress.org/trunk@55359 git-svn-id: http://core.svn.wordpress.org/trunk@54892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1b873c8a19
commit
818e9581a8
@ -5,7 +5,7 @@
|
||||
* @output wp-admin/js/updates.js
|
||||
*/
|
||||
|
||||
/* global pagenow */
|
||||
/* global pagenow, _wpThemeSettings */
|
||||
|
||||
/**
|
||||
* @param {jQuery} $ jQuery object.
|
||||
@ -1614,6 +1614,14 @@
|
||||
} );
|
||||
}
|
||||
|
||||
// DecrementCount from update count.
|
||||
if ( 'themes' === pagenow ) {
|
||||
var theme = _.find( _wpThemeSettings.themes, { id: response.slug } );
|
||||
if ( theme.hasUpdate ) {
|
||||
wp.updates.decrementCount( 'theme' );
|
||||
}
|
||||
}
|
||||
|
||||
wp.a11y.speak( _x( 'Deleted!', 'theme' ) );
|
||||
|
||||
$document.trigger( 'wp-theme-delete-success', response );
|
||||
|
2
wp-admin/js/updates.min.js
vendored
2
wp-admin/js/updates.min.js
vendored
File diff suppressed because one or more lines are too long
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.2-beta2-55358';
|
||||
$wp_version = '6.2-beta2-55359';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
x
Reference in New Issue
Block a user