[wp-trac] [WordPress Trac] #49132: Remove translation files when a plugin no longer exists
WordPress Trac
noreply at wordpress.org
Sun Jan 5 17:28:29 UTC 2020
#49132: Remove translation files when a plugin no longer exists
-------------------------+----------------------
Reporter: audrasjb | Owner: (none)
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: I18N | Version:
Severity: normal | Resolution: wontfix
Keywords: has-patch | Focuses:
-------------------------+----------------------
Comment (by knutsp):
> I kindly disagree on this point, as validate_active_plugins use
deactivate_plugins function which removes the plugin from active_plugins
site option. So the plugin data is actually deleted from the plugin
option, isn't it?
No. Plugin data can be anything in the database, a db table or several
options. Such may only be removed by the plugin itself, executed from the
`uninstall_$plugin` or it's own uninstall.php file.
I can understand the wish to clean up unnecessary files, but deleting
language files should only happen when properly deleting (uninstalling) a
plugin. A cleanup of either files, options or db tables that has become
obsolete because of file deletion outside WordPress admin should be plugin
territory.
Do not assume all language files in wp-content/languages folder is
downloaded from wp.org since translation plugins optionally put their
(source and compiled) files there (but warn that they can be overwritten
by language packs, and they may or may not keep a backup).
A recommended way to check is a plugin is causing an error is to
temporarily rename it. If no one visits the Plugins screen in that time,
these plugins are not even deactivated (just not loaded).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49132#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list