Prevents WordPress from automatically updating translation files in the global languages directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Disable auto translation updates | |
Description: Prevents WordPress from automatically updating translation files in the global languages directory. | |
Author: Tim Whitlock | |
Version: 1.0 | |
*/ | |
/** | |
* https://codex.wordpress.org/Configuring_Automatic_Background_Updates#Plugin_.26_Theme_Updates_via_Filter | |
*/ | |
if( function_exists('add_filter') ){ | |
add_filter( 'auto_update_translation', '__return_false' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Placing this file in the mu-plugins directory will prevent WordPress auto updates from overwriting translation files in the global "languages" directory at
wp-content/languages
.This applies to core translations directly inside the folder, plus theme and plugin translations inside "languages/themes" and "languages/plugins" respectively.
Note that translation files inside the actual themes and plugins will being overwritten regardless.