WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#36383 closed defect (bug) (fixed)

When upgrading a plugin/theme load also available language packs

Reported by: ocean90 Owned by: ocean90
Milestone: 4.6 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: has-patch
Focuses: Cc:

Description

#34029 handled this for plugin/theme installs, but today I noticed that the same happens for (bulk) upgrades too. :-(

Note: The API has already implemented a way to include the new language packs for updates, but it's currently disabled because "Core will simply be re-calling the API after updates are complete instead.". Example output: https://gist.github.com/ocean90/6a64c7a9abfd4b7541a3741f9ec31dfd

Attachments (1)

36383.patch (3.4 KB) - added by ocean90 4 years ago.

Download all attachments as: .zip

Change History (4)

@ocean90
4 years ago

This ticket was mentioned in Slack in #polyglots by ocean90. View the logs.


4 years ago

#2 @ocean90
4 years ago

  • Milestone changed from Awaiting Review to 4.6

#3 @ocean90
4 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 37272:

Upgrader: Clear plugin/theme caches directly after a plugin/theme has been updated.

wp_update_plugins() and wp_update_themes() are both hooked into upgrader_process_complete with priority 10. But at this stage the caches in get_plugins(), search_theme_directories(), and wp_get_themes() aren't refreshed yet so both functions couldn't fetch any translations for the new plugin/theme.
To reset the caches, wp_clean_themes_cache() and wp_clean_plugins_cache() are now hooked into upgrader_process_complete with priority 9.

This is a follow-up to [34751].

See #34029.
Fixes #36383.

Note: See TracTickets for help on using tickets.