Merge pull request #140 from DavidAnderson684/patch-9
Use the wp_get_installed_translations function conditionally This function was introduced in WP 3.7.
This commit is contained in:
commit
18818714c3
|
|
@ -569,6 +569,9 @@ if ( !class_exists('Puc_v4p2_UpdateChecker', false) ):
|
|||
* @return array
|
||||
*/
|
||||
protected function getInstalledTranslations() {
|
||||
if ( !function_exists('wp_get_installed_translations') ) {
|
||||
return array();
|
||||
}
|
||||
$installedTranslations = wp_get_installed_translations($this->translationType . 's');
|
||||
if ( isset($installedTranslations[$this->directoryName]) ) {
|
||||
$installedTranslations = $installedTranslations[$this->directoryName];
|
||||
|
|
|
|||
Loading…
Reference in New Issue