开发者 | aksharsoftsolutions |
---|---|
更新时间 | 2020年8月5日 20:21 |
捐献地址: | 去捐款 |
PHP版本: | 5.6.20 及以上 |
WordPress版本: | 5.5.2 |
版权: | GPL2 |
as-english-wp-admin
folder to /wp-content/plugins/
To fix this, move the file /wp-content/plugins/english-wp-admin/as-english-wp-admin.php to /wp-content/mu-plugins/ This will ensure this plugin is loaded before all other plugins and that it sets the correct language. This is a WordPress restriction.
update-core.php is whitelisted because translation updates do not work properly if you change locale on that screen.
Use the english_wordpress_admin_whitelist filter. It takes a preg-style regular expression. / Whitelist /wp-admin/options-general.php?page=my_plugin / add_filter('english_wordpress_admin_whitelist', function($whitelisted_urls) { $whitelisted_urls[] = '.*\/wp-admin\/options-general.php\?page=my_page$'; return $whitelisted_urls; });
If you only want the first admin user to have this option, put this code in your themes function.php file: / Only allow the admin user to change the admin language / if(get_current_user_id() === 1) { add_filter('english_wordpress_admin_show_admin_bar', '__return_true'); } else { add_filter('english_wordpress_admin_show_admin_bar', '__return_false'); }
Use the snippet below to have admins always use the admin page in english. /* Enable the plugin automatically for admin users / if(current_user_can('manage_options')) { global $english_wordpress_admin_plugin; $english_wordpress_admin_plugin->set_cookie(1); add_filter('english_wordpress_admin_show_admin_bar', '__return_false'); }
You can leave feature requests in the plugin support forum.