PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Dir : /home/trave494/polo-family.com/wp-content/plugins/aawzone-ebay/include/helpers/ |
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 IP: 209.182.202.254 |
Dir : //home/trave494/polo-family.com/wp-content/plugins/aawzone-ebay/include/helpers/social.class.php |
<?php !defined('ABSPATH') and exit; if (class_exists('WooZoneProviderEbay_Social') != true) { class WooZoneProviderEbay_Social { /* * Some required plugin information */ const VERSION = '1.0'; public $share_url = ''; public $social_counts = array( 'facebookshares' => 0, 'pinterestshares' => 0, 'googleplusones' => 0 ); /* * Required __construct() function that initalizes the WooZoneProviderEbay_Social */ public function __construct() { } public function get_google_shares() { $content = WooZoneProviderEbay()->wp_filesystem->get_contents( 'https://plusone.google.com/u/0/_/+1/fastbutton?url=' . urlencode( $this->share_url ) ); $doc = new DOMdocument(); libxml_use_internal_errors(true); $doc->loadHTML($content); $doc->saveHTML(); $num = $doc->getElementById('aggregateCount')->textContent; if($num){ $this->social_counts['googleplusones'] = intval($num) ; } } public function get_facebook_shares() { $api = WooZoneProviderEbay()->wp_filesystem->get_contents( 'http://graph.facebook.com/?id=' . $this->share_url ); $count = json_decode( $api ); if(isset($count->share) && $count->share->share_count != '0' ){ $this->social_counts['facebookshares'] = $count->share->share_count; } } public function get_pinterest_shares() { $api = WooZoneProviderEbay()->wp_filesystem->get_contents( 'http://api.pinterest.com/v1/urls/count.json?callback%20&url=' . $this->share_url ); $body = preg_replace( '/^receiveCount\((.*)\)$/', '\\1', $api ); $count = json_decode( $body ); if(isset($count) && $count->count != '0' ){ $this->social_counts['pinterestshares'] = $count->count; } } public function update_shares( $url='' ) { $this->share_url = $url; $this->get_facebook_shares(); $this->get_pinterest_shares(); $this->get_google_shares(); return $this->social_counts; } } }