PHP Fatal error: Call to undefined function wp_get_available_translations()
-
Hi,
I like your plug-in but when i try to install all languagepacks i get a fatal error.
PHP Fatal error: Call to undefined function wp_get_available_translations()i solved it by adding this on line 99
function prefloc_install_locales($new) {
require_once( ABSPATH . ‘wp-admin/includes/translation-install.php’ );
if ($new) {
$available = wp_get_available_translations();
$installed = wp_get_installed_translations(‘core’)[‘default’];
$diff = array_diff_key($available, $installed);foreach ($diff as $lang)
wp_download_language_pack($lang[‘language’]);
}
}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘PHP Fatal error: Call to undefined function wp_get_available_translations()’ is closed to new replies.