Update/Install: Correctly decrement the update count after translation updates.

After [37714], an error was unnecessarily being displayed in the JavaScript console when updating translations on `wp-admin/update-core.php`. Let's not throw an error in these cases.

Props afercia.
Fixes #37127.
Built from https://develop.svn.wordpress.org/trunk@37971


git-svn-id: http://core.svn.wordpress.org/trunk@37912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Pascal Birchler 2016-07-05 15:18:27 +00:00
parent 848318aeb1
commit b55493e3e6
3 changed files with 8 additions and 16 deletions

View File

@ -295,20 +295,12 @@
$dashboardNavMenuUpdateCount.removeAttr( 'title' );
$dashboardNavMenuUpdateCount.find( '.update-count' ).text( count );
switch ( type ) {
case 'plugin':
$menuItem = $( '#menu-plugins' );
$itemCount = $menuItem.find( '.plugin-count' );
break;
case 'theme':
$menuItem = $( '#menu-appearance' );
$itemCount = $menuItem.find( '.theme-count' );
break;
default:
window.console.error( '"%s" is not white-listed to have its count decremented.', type );
return;
if ( 'plugin' === type ) {
$menuItem = $( '#menu-plugins' );
$itemCount = $menuItem.find( '.plugin-count' );
} else if ( 'theme' === type ) {
$menuItem = $( '#menu-appearance' );
$itemCount = $menuItem.find( '.theme-count' );
}
// Decrement the counter of the other menu items.

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-beta1-37970';
$wp_version = '4.6-beta1-37971';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.