'; // Backend available? $backend_available = 1; // Button alt label. $button_title_array = array( 'bg' => 'Сподели в XING', 'cs' => 'Sdílet na XINGu', 'da' => 'Del på XING', 'de' => 'Bei XING teilen', 'en' => 'Share on XING', 'es' => 'Compartir en XING', 'fi' => 'Jaa XINGissä', 'fr' => 'Partager sur XING', 'hr' => 'Podijelite na XING', 'hu' => 'Megosztás XINGen', 'it' => 'Condividi su XING', 'ja' => 'XING上で共有', 'ko' => 'XING에서 공유하기', 'nl' => 'Delen op XING', 'no' => 'Del på XING', 'pl' => 'Udostępnij przez XING', 'pt' => 'Compartilhar no XING', 'ro' => 'Partajează pe XING', 'ru' => 'Поделиться на XING', 'sk' => 'Zdieľať na XING', 'sl' => 'Deli na XING', 'sr' => 'Podeli na XING-u', 'sv' => 'Dela på XING', 'tr' => 'XING\'ta paylaş', 'zh' => '分享至XING', ); } elseif ( isset( $backend ) && 1 === $backend ) { // Set xing options. $xing_json = array( 'url' => $post_url_raw, ); // Set post options. $xing_post_options = array( 'method' => 'POST', 'timeout' => 5, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true, 'headers' => array( 'content-type' => 'application/json' ), 'body' => wp_json_encode( $xing_json ), ); // Fetch counts. $xing = sanitize_text_field( wp_remote_retrieve_body( wp_remote_post( 'https://www.xing.com/spi/shares/statistics', $xing_post_options ) ) ); $xing_json = json_decode( $xing, true ); // Store results, if we have some and record errors, if enabled (e.g. request from the status tab). if ( isset( $xing_json['share_counter'] ) ) { $share_counts['xing'] = intval( $xing_json['share_counter'] ); } elseif ( isset( $record_errors ) && 1 === $record_errors ) { $service_errors['xing'] = $xing; } }