Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions includes/class-locale.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Locale extends GP_Locale {
/**
* Array of available translations data obtained with wp_get_available_translations() for the locale.
*
* @var array
* @var array|null
*/
public $translations;

Expand Down Expand Up @@ -78,11 +78,7 @@ public function __construct( $locale ) {
*/
public function has_translations() {

if ( is_null( $this->translations ) ) {
return false;
} else {
return true;
}
return is_array( $this->translations ) && array() !== $this->translations;
}
}

Expand Down