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:
parent
848318aeb1
commit
b55493e3e6
|
@ -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
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue