Last active
April 11, 2024 10:44
-
-
Save timwhitlock/8d4d2fa35c0ab312d040223ef6990e5b to your computer and use it in GitHub Desktop.
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://developer.wordpress.org/advanced-administration/upgrade/upgrading/#configuration-via-filters | |
*/ | |
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
The
auto_update_translation
filter is documented asauto_update_{type}
https://developer.wordpress.org/reference/hooks/auto_update_type/