You are here

public function LikeBtn::syncLocales in Like Button 7

Same name and namespace in other branches
  1. 8.2 likebtn.php \LikeBtn::syncLocales()

Locales sync function.

1 call to LikeBtn::syncLocales()
LikeBtn::runSyncLocales in ./likebtn.php
Run locales synchronization.

File

./likebtn.php, line 419
LikeBtn like button.

Class

LikeBtn

Code

public function syncLocales() {
  $url = LIKEBTN_API_URL . "?action=locale";
  $response_string = $this
    ->curl($url);
  $response = $this
    ->jsonDecode($response_string);
  if (isset($response['result']) && $response['result'] == 'success' && isset($response['response']) && count($response['response'])) {
    variable_set('likebtn_locales', $response['response']);
  }
}