'; // Backend available? $backend_available = 1; // Button alt label. $button_title_array = array( 'bg' => 'Сподели в AddThis', 'cs' => 'Sdílet na AddThis', 'da' => 'Del på AddThis', 'de' => 'Bei AddThis teilen', 'en' => 'Share on AddThis', 'es' => 'Compartir en AddThis', 'fi' => 'Jaa AddThisissä', 'fr' => 'Partager sur AddThis', 'hr' => 'Podijelite na AddThis', 'hu' => 'Megosztás AddThisen', 'it' => 'Condividi su AddThis', 'ja' => 'AddThis上で共有', 'ko' => 'AddThis에서 공유하기', 'nl' => 'Delen op AddThis', 'no' => 'Del på AddThis', 'pl' => 'Udostępnij przez AddThis', 'pt' => 'Compartilhar no AddThis', 'ro' => 'Partajează pe AddThis', 'ru' => 'Поделиться на AddThis', 'sk' => 'Zdieľať na AddThis', 'sl' => 'Deli na AddThis', 'sr' => 'Podeli na AddThis', 'sv' => 'Dela på AddThis', 'tr' => 'AddThis\'ta paylaş', 'zh' => '在AddThis上分享', ); } elseif ( isset( $backend ) && 1 === $backend ) { // Fetch share counts. $addthis = sanitize_text_field( wp_remote_retrieve_body( wp_remote_get( 'http://api-public.addthis.com/url/shares.json?url=' . $post_url ) ) ); $addthis_json = json_decode( $addthis, true ); // Store results, if we have some, else record errors, if enabled (e.g. request from the status tab). if ( isset( $addthis_json['shares'] ) ) { $share_counts['addthis'] = intval( $addthis_json['shares'] ); } elseif ( isset( $record_errors ) && 1 === $record_errors ) { $service_errors['addthis'] = $addthis; } } // End if Frontend or Backend.