check_admin_referer( 'upgrade-translations'
);
require_once ABSPATH . 'wp-admin/admin-header.php';
require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
$url = 'update-core.php?action=do-translation-upgrade';
$nonce = 'upgrade-translations';
$title =
__( 'Update Translations'
);
$context = WP_LANG_DIR;
$upgrader =
new Language_Pack_Upgrader( new Language_Pack_Upgrader_Skin( compact( 'url', 'nonce', 'title', 'context'
) ) );
$result =
$upgrader->
bulk_upgrade();
wp_localize_script( 'updates',
'_wpUpdatesItemCounts',
array
( 'totals' =>
wp_get_update_data(),
) );
require_once ABSPATH . 'wp-admin/admin-footer.php';
}