Social Counter for WordPress – AccessPress Social Counter - Version 1.7.8

Version Description

Download this release

Release Info

Developer Access Keys
Plugin Icon 128x128 Social Counter for WordPress – AccessPress Social Counter
Version 1.7.8
Comparing to
See all releases

Code changes from version 1.7.7 to 1.7.8

accesspress-social-counter.php CHANGED
@@ -5,7 +5,7 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
5
  * Plugin Name: AccessPress Social Counter
6
  * Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-counter/
7
  * Description: A plugin to display your social accounts fans, subscribers and followers number on your website with handful of backend settings and interface.
8
- * Version: 1.7.7
9
  * Author: AccessPress Themes
10
  * Author URI: http://accesspressthemes.com
11
  * Text Domain: aps-counter
@@ -17,16 +17,19 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
17
  * Declartion of necessary constants for plugin
18
  * */
19
  if ( ! defined( 'SC_IMAGE_DIR' ) ) {
20
- define( 'SC_IMAGE_DIR', plugin_dir_url( __FILE__ ) . 'images' );
21
  }
22
  if ( ! defined( 'SC_JS_DIR' ) ) {
23
- define( 'SC_JS_DIR', plugin_dir_url( __FILE__ ) . 'js' );
24
  }
25
  if ( ! defined( 'SC_CSS_DIR' ) ) {
26
- define( 'SC_CSS_DIR', plugin_dir_url( __FILE__ ) . 'css' );
27
  }
28
  if ( ! defined( 'SC_VERSION' ) ) {
29
- define( 'SC_VERSION', '1.7.7' );
 
 
 
30
  }
31
  /**
32
  * Register of widgets
@@ -34,423 +37,427 @@ if ( ! defined( 'SC_VERSION' ) ) {
34
  include_once('inc/backend/widget.php');
35
  if ( ! class_exists( 'SC_Class' ) ) {
36
 
37
- class SC_Class{
38
-
39
- var $apsc_settings;
40
-
41
- /**
42
- * Initializes the plugin functions
43
- */
44
- function __construct(){
45
- $this -> apsc_settings = get_option( 'apsc_settings' );
46
- register_activation_hook( __FILE__, array( $this, 'load_default_settings' ) ); //loads default settings for the plugin while activating the plugin
47
- add_action( 'init', array( $this, 'plugin_text_domain' ) ); //loads text domain for translation ready
48
- add_action( 'admin_menu', array( $this, 'add_sc_menu' ) ); //adds plugin menu in wp-admin
49
- add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_assets' ) ); //registers admin assests such as js and css
50
- add_action( 'wp_enqueue_scripts', array( $this, 'register_frontend_assets' ) ); //registers js and css for frontend
51
- add_action( 'admin_post_apsc_settings_action', array( $this, 'apsc_settings_action' ) ); //recieves the posted values from settings form
52
- add_action( 'admin_post_apsc_restore_default', array( $this, 'apsc_restore_default' ) ); //restores default settings;
53
- add_action( 'widgets_init', array( $this, 'register_apsc_widget' ) ); //registers the widget
54
- add_shortcode( 'aps-counter', array( $this, 'apsc_shortcode' ) ); //adds a shortcode
55
- add_shortcode( 'aps-get-count', array( $this, 'apsc_count_shortcode' ) ); //
56
- add_action( 'admin_post_apsc_delete_cache', array( $this, 'apsc_delete_cache' ) ); //deletes the counter values from cache
57
- }
58
-
59
- /**
60
- * Plugin Translation
61
- */
62
- function plugin_text_domain(){
63
- load_plugin_textdomain( 'accesspress-social-counter', false, basename( dirname( __FILE__ ) ) . '/languages/' );
64
- }
65
-
66
- /**
67
- * Load Default Settings
68
- * */
69
- function load_default_settings(){
70
- if ( ! get_option( 'apsc_settings' ) ) {
71
- $apsc_settings = $this -> get_default_settings();
72
- update_option( 'apsc_settings', $apsc_settings );
73
- }
74
- }
75
-
76
- /**
77
- * Plugin Admin Menu
78
- */
79
- function add_sc_menu(){
80
- add_menu_page( __( 'AccessPress Social Counter', 'accesspress-social-counter' ), __( 'AccessPress Social Counter', 'accesspress-social-counter' ), 'manage_options', 'ap-social-counter', array( $this, 'sc_settings' ), SC_IMAGE_DIR . '/sc-icon.png' );
81
- }
82
-
83
- /**
84
- * Plugin Main Settings Page
85
- */
86
- function sc_settings(){
87
- include('inc/backend/settings.php');
88
- }
89
-
90
- /**
91
- * Registering of backend js and css
92
- */
93
- function register_admin_assets(){
94
- if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'ap-social-counter' ) {
95
- wp_enqueue_style( 'sc-admin-css', SC_CSS_DIR . '/backend.css', array(), SC_VERSION );
96
- wp_enqueue_script( 'sc-admin-js', SC_JS_DIR . '/backend.js', array( 'jquery', 'jquery-ui-sortable' ), SC_VERSION );
97
- }
98
-
99
- wp_enqueue_style( 'fontawesome-css', SC_CSS_DIR . '/font-awesome.min.css', false, SC_VERSION );
100
- }
101
-
102
- /**
103
- * Registers Frontend Assets
104
- * */
105
- function register_frontend_assets(){
106
- $apsc_settings = $this -> apsc_settings;
107
- $enable_font_css = (isset( $apsc_settings[ 'disable_font_css' ] ) && $apsc_settings[ 'disable_font_css' ] == 0) ? true : false;
108
- $enable_frontend_css = (isset( $apsc_settings[ 'disable_frontend_css' ] ) && $apsc_settings[ 'disable_frontend_css' ] == 0) ? true : false;
109
- if ( $enable_font_css ) {
110
- wp_enqueue_style( 'fontawesome-css', SC_CSS_DIR . '/font-awesome.min.css', false, SC_VERSION );
111
- }
112
- if ( $enable_frontend_css ) {
113
- wp_enqueue_style( 'apsc-frontend-css', SC_CSS_DIR . '/frontend.css', array(), SC_VERSION );
114
- }
115
- }
116
-
117
- /**
118
- * Saves settings to database
119
- */
120
- function apsc_settings_action(){
121
- if ( ! empty( $_POST ) && wp_verify_nonce( $_POST[ 'apsc_settings_nonce' ], 'apsc_settings_action' ) ) {
122
- include('inc/backend/save-settings.php');
123
- }
124
- }
125
-
126
- /**
127
- * Prints array in pre format
128
- */
129
- function print_array( $array ){
130
- echo "<pre>";
131
- print_r( $array );
132
- echo "</pre>";
133
- }
134
-
135
- /**
136
- * Restores the default
137
- */
138
- function apsc_restore_default(){
139
- if ( ! empty( $_GET ) && wp_verify_nonce( $_GET[ '_wpnonce' ], 'apsc-restore-default-nonce' ) ) {
140
- $apsc_settings = $this -> get_default_settings();
141
- update_option( 'apsc_settings', $apsc_settings );
142
- $_SESSION[ 'apsc_message' ] = __( 'Default Settings Restored Successfully', 'accesspress-social-counter' );
143
- wp_redirect( admin_url() . 'admin.php?page=ap-social-counter' );
144
- }
145
- }
146
-
147
- /**
148
- * Returns Default Settings
149
- */
150
- function get_default_settings(){
151
- $apsc_settings = array( 'social_profile' => array( 'facebook' => array( 'page_id' => '' ),
152
- 'twitter' => array( 'username' => '', 'consumer_key' => '', 'consumer_secret' => '', 'access_token' => '', 'access_token_secret' => '' ),
153
- 'googlePlus' => array( 'page_id' => '', 'api_key' => '' ),
154
- 'instagram' => array( 'username' => '', 'access_token' => '', 'user_id' => '' ),
155
- 'youtube' => array( 'username' => '', 'channel_url' => '' ),
156
- 'soundcloud' => array( 'username' => '', 'client_id' => '' ),
157
- 'dribbble' => array( 'username' => '' ),
158
- ),
159
- 'profile_order' => array( 'facebook', 'twitter', 'googlePlus', 'instagram', 'youtube', 'soundcloud', 'dribbble', 'posts', 'comments' ),
160
- 'social_profile_theme' => 'theme-1',
161
- 'counter_format' => 'comma',
162
- 'cache_period' => '',
163
- 'disable_font_css' => 0,
164
- 'disable_frontend_css' => 0
165
- );
166
- return $apsc_settings;
167
- }
168
-
169
- /**
170
- * AccessPress Social Counter Widget
171
- */
172
- function register_apsc_widget(){
173
- register_widget( 'APSC_Widget' );
174
- }
175
-
176
- /**
177
- * Adds Shortcode
178
- */
179
- function apsc_shortcode( $atts ){
180
- ob_start();
181
- include('inc/frontend/shortcode.php');
182
- $html = ob_get_contents();
183
- ob_get_clean();
184
- return $html;
185
- }
186
-
187
- /**
188
- * Clears the counter cache
189
- */
190
- function apsc_delete_cache(){
191
- if ( ! empty( $_GET ) && wp_verify_nonce( $_GET[ '_wpnonce' ], 'apsc-cache-nonce' ) ) {
192
- $transient_array = array( 'apsc_facebook', 'apsc_twitter', 'apsc_youtube', 'apsc_instagram', 'apsc_googlePlus', 'apsc_soundcloud', 'apsc_dribbble', 'apsc_posts', 'apsc_comments' );
193
- foreach ( $transient_array as $transient ) {
194
- delete_transient( $transient );
195
- }
196
- $_SESSION[ 'apsc_message' ] = __( 'Cache Deleted Successfully', 'accesspress-social-counter' );
197
- wp_redirect( admin_url() . 'admin.php?page=ap-social-counter' );
198
- }
199
- }
200
-
201
- /**
202
- *
203
- * @param type $user
204
- * @param type $consumer_key
205
- * @param type $consumer_secret
206
- * @param type $oauth_access_token
207
- * @param type $oauth_access_token_secret
208
- * @return string
209
- */
210
- function authorization( $user, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret ){
211
- $query = 'screen_name=' . $user;
212
- $signature = $this -> signature( $query, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret );
213
-
214
- return $this -> header( $signature );
215
- }
216
-
217
- /**
218
- *
219
- * @param type $url
220
- * @param type $query
221
- * @param type $method
222
- * @param type $params
223
- * @return type string
224
- */
225
- function signature_base_string( $url, $query, $method, $params ){
226
- $return = array();
227
- ksort( $params );
228
-
229
- foreach ( $params as $key => $value ) {
230
- $return[] = $key . '=' . $value;
231
- }
232
-
233
- return $method . "&" . rawurlencode( $url ) . '&' . rawurlencode( implode( '&', $return ) ) . '%26' . rawurlencode( $query );
234
- }
235
-
236
- /**
237
- *
238
- * @param type $query
239
- * @param type $consumer_key
240
- * @param type $consumer_secret
241
- * @param type $oauth_access_token
242
- * @param type $oauth_access_token_secret
243
- * @return type array
244
- */
245
- function signature( $query, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret ){
246
- $oauth = array(
247
- 'oauth_consumer_key' => $consumer_key,
248
- 'oauth_nonce' => hash_hmac( 'sha1', time(), true ),
249
- 'oauth_signature_method' => 'HMAC-SHA1',
250
- 'oauth_token' => $oauth_access_token,
251
- 'oauth_timestamp' => time(),
252
- 'oauth_version' => '1.0'
253
- );
254
- $api_url = 'https://api.twitter.com/1.1/users/show.json';
255
- $base_info = $this -> signature_base_string( $api_url, $query, 'GET', $oauth );
256
- $composite_key = rawurlencode( $consumer_secret ) . '&' . rawurlencode( $oauth_access_token_secret );
257
- $oauth_signature = base64_encode( hash_hmac( 'sha1', $base_info, $composite_key, true ) );
258
- $oauth[ 'oauth_signature' ] = $oauth_signature;
259
-
260
- return $oauth;
261
- }
262
-
263
- /**
264
- * Build the header.
265
- *
266
- * @param array $signature OAuth signature.
267
- *
268
- * @return string OAuth Authorization.
269
- */
270
- public function header( $signature ){
271
- $return = 'OAuth ';
272
- $values = array();
273
-
274
- foreach ( $signature as $key => $value ) {
275
- $values[] = $key . '="' . rawurlencode( $value ) . '"';
276
- }
277
-
278
- $return .= implode( ', ', $values );
279
-
280
- return $return;
281
- }
282
-
283
- /**
284
- * Returns twitter count
285
- */
286
- function get_twitter_count(){
287
- $apsc_settings = $this -> apsc_settings;
288
- $user = $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'username' ];
289
- $api_url = 'https://api.twitter.com/1.1/users/show.json';
290
- $params = array(
291
- 'method' => 'GET',
292
- 'sslverify' => false,
293
- 'timeout' => 60,
294
- 'headers' => array(
295
- 'Content-Type' => 'application/x-www-form-urlencoded',
296
- 'Authorization' => $this -> authorization(
297
- $user, $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'consumer_key' ], $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'consumer_secret' ], $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'access_token' ], $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'access_token_secret' ]
298
- )
299
- )
300
- );
301
-
302
- $connection = wp_remote_get( $api_url . '?screen_name=' . $user, $params );
303
-
304
- if ( is_wp_error( $connection ) ) {
305
- $count = 0;
306
- } else {
307
- $_data = json_decode( $connection[ 'body' ], true );
308
- if ( isset( $_data[ 'followers_count' ] ) ) {
309
- $count = intval( $_data[ 'followers_count' ] );
310
- } else {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
311
  $count = 0;
312
- }
313
- }
314
- return $count;
315
- }
316
-
317
- /**
318
- *
319
- * @param int $count
320
- * @param string $format
321
- */
322
- function get_formatted_count( $count, $format ){
323
- if ( $count == '' ) {
324
- return '';
325
- }
326
- switch ( $format ) {
327
- case 'comma':
328
- $count = number_format( $count );
329
- break;
330
- case 'short':
331
- $count = $this -> abreviateTotalCount( $count );
332
- break;
333
- default:
334
- break;
335
- }
336
- return $count;
337
- }
338
-
339
- /**
340
- *
341
- * @param integer $value
342
- * @return string
343
- */
344
- function abreviateTotalCount( $value ){
345
-
346
- $abbreviations = array( 12 => 'T', 9 => 'B', 6 => 'M', 3 => 'K', 0 => '' );
347
-
348
- foreach ( $abbreviations as $exponent => $abbreviation ) {
349
-
350
- if ( $value >= pow( 10, $exponent ) ) {
351
-
352
- return round( floatval( $value / pow( 10, $exponent ) ), 1 ) . $abbreviation;
353
- }
354
- }
355
- }
356
-
357
- function facebook_count( $url ){
358
-
359
- // Query in FQL
360
- $fql = "SELECT like_count ";
361
- $fql .= " FROM link_stat WHERE url = '$url'";
362
-
363
- $fqlURL = "https://api.facebook.com/method/fql.query?format=json&query=" . urlencode( $fql );
364
-
365
- // Facebook Response is in JSON
366
- $response = wp_remote_get( $fqlURL );
367
- $response = json_decode( $response[ 'body' ] );
368
- if ( is_array( $response ) && isset( $response[ 0 ] -> like_count ) ) {
369
- return $response[ 0 ] -> like_count;
370
- } else {
371
- $count = '0';
372
- return $count;
373
- }
374
- }
375
-
376
- function get_count( $social_media ){
377
- include('inc/frontend/api.php');
378
- return $count;
379
- }
380
-
381
- /**
382
- *
383
- * Counter Only Shortcode
384
- * */
385
- function apsc_count_shortcode( $atts ){
386
- if ( isset( $atts[ 'social_media' ] ) ) {
387
- $count = $this -> get_count( $atts[ 'social_media' ] );
388
- if ( isset( $atts[ 'count_format' ] ) && $count != '' ) {
389
- $count = $this -> get_formatted_count( $count, $atts[ 'count_format' ] );
390
- }
391
- return $count;
392
- }
393
- }
394
-
395
- /**
396
- * Get Facebook Access Token
397
- * */
398
- function get_fb_access_token(){
399
- $apsc_settings = $this -> apsc_settings;
400
- $api_url = 'https://graph.facebook.com/';
401
- $url = sprintf(
402
- '%soauth/access_token?client_id=%s&client_secret=%s&grant_type=client_credentials', $api_url, $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_id' ], $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_secret' ]
403
- );
404
- $access_token = wp_remote_get( $url, array( 'timeout' => 60 ) );
405
- //echo "<pre>";
406
- // print_r($access_token);
407
- // echo "</pre>";
408
- // die();
409
- if ( is_wp_error( $access_token ) || ( isset( $access_token[ 'response' ][ 'code' ] ) && 200 != $access_token[ 'response' ][ 'code' ] ) ) {
410
- return '';
411
- } else {
412
- return sanitize_text_field( $access_token[ 'body' ] );
413
- }
414
- }
415
-
416
- /**
417
- * Get New Facebook Count
418
- * */
419
- function new_fb_count(){
420
- $apsc_settings = $this -> apsc_settings;
421
- $access_token = $this -> get_fb_access_token();
422
- $access_token = json_decode( $access_token );
423
- $access_token = $access_token -> access_token;
424
- $api_url = 'https://graph.facebook.com/v2.6/';
425
- $url = sprintf(
426
- '%s%s?fields=fan_count&access_token=%s', $api_url, $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'page_id' ], $access_token
427
- );
428
-
429
- $connection = wp_remote_get( $url, array( 'timeout' => 60 ) );
430
- //echo "<pre>";
431
- // print_r($connection);
432
- // echo "</pre>";
433
- // die();
434
-
435
- if ( is_wp_error( $connection ) || ( isset( $connection[ 'response' ][ 'code' ] ) && 200 != $connection[ 'response' ][ 'code' ] ) ) {
436
- $total = 0;
437
- } else {
438
- $_data = json_decode( $connection[ 'body' ], true );
439
-
440
- if ( isset( $_data[ 'fan_count' ] ) ) {
441
- $count = intval( $_data[ 'fan_count' ] );
442
-
443
- $total = $count;
444
- } else {
445
- $total = 0;
446
- }
447
- }
448
-
449
-
450
- return $total;
451
- }
452
-
453
- }
454
-
455
- $sc_object = new SC_Class(); //initialization of plugin
456
  }
5
  * Plugin Name: AccessPress Social Counter
6
  * Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-counter/
7
  * Description: A plugin to display your social accounts fans, subscribers and followers number on your website with handful of backend settings and interface.
8
+ * Version: 1.7.8
9
  * Author: AccessPress Themes
10
  * Author URI: http://accesspressthemes.com
11
  * Text Domain: aps-counter
17
  * Declartion of necessary constants for plugin
18
  * */
19
  if ( ! defined( 'SC_IMAGE_DIR' ) ) {
20
+ define( 'SC_IMAGE_DIR', plugin_dir_url( __FILE__ ) . 'images' );
21
  }
22
  if ( ! defined( 'SC_JS_DIR' ) ) {
23
+ define( 'SC_JS_DIR', plugin_dir_url( __FILE__ ) . 'js' );
24
  }
25
  if ( ! defined( 'SC_CSS_DIR' ) ) {
26
+ define( 'SC_CSS_DIR', plugin_dir_url( __FILE__ ) . 'css' );
27
  }
28
  if ( ! defined( 'SC_VERSION' ) ) {
29
+ define( 'SC_VERSION', '1.7.8' );
30
+ }
31
+ if ( ! defined( 'SC_PATH' ) ) {
32
+ define( 'SC_PATH', plugin_dir_path( __FILE__ ) );
33
  }
34
  /**
35
  * Register of widgets
37
  include_once('inc/backend/widget.php');
38
  if ( ! class_exists( 'SC_Class' ) ) {
39
 
40
+ class SC_Class{
41
+
42
+ var $apsc_settings;
43
+
44
+ /**
45
+ * Initializes the plugin functions
46
+ */
47
+ function __construct(){
48
+ $this -> apsc_settings = get_option( 'apsc_settings' );
49
+ register_activation_hook( __FILE__, array( $this, 'load_default_settings' ) ); //loads default settings for the plugin while activating the plugin
50
+ add_action( 'init', array( $this, 'plugin_text_domain' ) ); //loads text domain for translation ready
51
+ add_action( 'admin_menu', array( $this, 'add_sc_menu' ) ); //adds plugin menu in wp-admin
52
+ add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_assets' ) ); //registers admin assests such as js and css
53
+ add_action( 'wp_enqueue_scripts', array( $this, 'register_frontend_assets' ) ); //registers js and css for frontend
54
+ add_action( 'admin_post_apsc_settings_action', array( $this, 'apsc_settings_action' ) ); //recieves the posted values from settings form
55
+ add_action( 'admin_post_apsc_restore_default', array( $this, 'apsc_restore_default' ) ); //restores default settings;
56
+ add_action( 'widgets_init', array( $this, 'register_apsc_widget' ) ); //registers the widget
57
+ add_shortcode( 'aps-counter', array( $this, 'apsc_shortcode' ) ); //adds a shortcode
58
+ add_shortcode( 'aps-get-count', array( $this, 'apsc_count_shortcode' ) ); //
59
+ add_action( 'admin_post_apsc_delete_cache', array( $this, 'apsc_delete_cache' ) ); //deletes the counter values from cache
60
+ }
61
+
62
+ /**
63
+ * Plugin Translation
64
+ */
65
+ function plugin_text_domain(){
66
+ load_plugin_textdomain( 'accesspress-social-counter', false, basename( dirname( __FILE__ ) ) . '/languages/' );
67
+ }
68
+
69
+ /**
70
+ * Load Default Settings
71
+ * */
72
+ function load_default_settings(){
73
+ if ( ! get_option( 'apsc_settings' ) ) {
74
+ $apsc_settings = $this -> get_default_settings();
75
+ update_option( 'apsc_settings', $apsc_settings );
76
+ }
77
+ }
78
+
79
+ /**
80
+ * Plugin Admin Menu
81
+ */
82
+ function add_sc_menu(){
83
+ add_menu_page( __( 'AccessPress Social Counter', 'accesspress-social-counter' ), __( 'AccessPress Social Counter', 'accesspress-social-counter' ), 'manage_options', 'ap-social-counter', array( $this, 'sc_settings' ), SC_IMAGE_DIR . '/sc-icon.png' );
84
+ }
85
+
86
+ /**
87
+ * Plugin Main Settings Page
88
+ */
89
+ function sc_settings(){
90
+ include('inc/backend/settings.php');
91
+ }
92
+
93
+ /**
94
+ * Registering of backend js and css
95
+ */
96
+ function register_admin_assets(){
97
+ if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'ap-social-counter' ) {
98
+ wp_enqueue_style( 'sc-admin-css', SC_CSS_DIR . '/backend.css', array(), SC_VERSION );
99
+ wp_enqueue_script( 'sc-admin-js', SC_JS_DIR . '/backend.js', array( 'jquery', 'jquery-ui-sortable' ), SC_VERSION );
100
+ wp_enqueue_script( 'sc-wpac-time-js', SC_JS_DIR . '/wpac-time.js', array( 'jquery' ), SC_PRO_VERSION ); // Third Party API for Facebook followers count
101
+ wp_enqueue_script( 'sc-wpac-js', SC_JS_DIR . '/wpac.js', array( 'jquery' ), SC_PRO_VERSION ); // Third Party API for Facebook followers count
102
+ }
103
+ wp_enqueue_style( 'fontawesome-css', SC_CSS_DIR . '/font-awesome.min.css', false, SC_VERSION );
104
+ }
105
+
106
+ /**
107
+ * Registers Frontend Assets
108
+ * */
109
+ function register_frontend_assets(){
110
+ $apsc_settings = $this -> apsc_settings;
111
+ $enable_font_css = (isset( $apsc_settings[ 'disable_font_css' ] ) && $apsc_settings[ 'disable_font_css' ] == 0) ? true : false;
112
+ $enable_frontend_css = (isset( $apsc_settings[ 'disable_frontend_css' ] ) && $apsc_settings[ 'disable_frontend_css' ] == 0) ? true : false;
113
+ if ( $enable_font_css ) {
114
+ wp_enqueue_style( 'fontawesome-css', SC_CSS_DIR . '/font-awesome.min.css', false, SC_VERSION );
115
+ }
116
+ if ( $enable_frontend_css ) {
117
+ wp_enqueue_style( 'apsc-frontend-css', SC_CSS_DIR . '/frontend.css', array(), SC_VERSION );
118
+ }
119
+ }
120
+
121
+ /**
122
+ * Saves settings to database
123
+ */
124
+ function apsc_settings_action(){
125
+ if ( ! empty( $_POST ) && wp_verify_nonce( $_POST[ 'apsc_settings_nonce' ], 'apsc_settings_action' ) ) {
126
+ include('inc/backend/save-settings.php');
127
+ }
128
+ }
129
+
130
+ /**
131
+ * Prints array in pre format
132
+ */
133
+ function print_array( $array ){
134
+ echo "<pre>";
135
+ print_r( $array );
136
+ echo "</pre>";
137
+ }
138
+
139
+ /**
140
+ * Restores the default
141
+ */
142
+ function apsc_restore_default(){
143
+ if ( ! empty( $_GET ) && wp_verify_nonce( $_GET[ '_wpnonce' ], 'apsc-restore-default-nonce' ) ) {
144
+ $apsc_settings = $this -> get_default_settings();
145
+ update_option( 'apsc_settings', $apsc_settings );
146
+ $_SESSION[ 'apsc_message' ] = __( 'Default Settings Restored Successfully', 'accesspress-social-counter' );
147
+ wp_redirect( admin_url() . 'admin.php?page=ap-social-counter' );
148
+ }
149
+ }
150
+
151
+ /**
152
+ * Returns Default Settings
153
+ */
154
+ function get_default_settings(){
155
+ $apsc_settings = array( 'social_profile' => array( 'facebook' => array( 'page_id' => '' ),
156
+ 'twitter' => array( 'username' => '', 'consumer_key' => '', 'consumer_secret' => '', 'access_token' => '', 'access_token_secret' => '' ),
157
+ 'googlePlus' => array( 'page_id' => '', 'api_key' => '' ),
158
+ 'instagram' => array( 'username' => '', 'access_token' => '', 'user_id' => '' ),
159
+ 'youtube' => array( 'username' => '', 'channel_url' => '' ),
160
+ 'soundcloud' => array( 'username' => '', 'client_id' => '' ),
161
+ 'dribbble' => array( 'username' => '' ),
162
+ ),
163
+ 'profile_order' => array( 'facebook', 'twitter', 'googlePlus', 'instagram', 'youtube', 'soundcloud', 'dribbble', 'posts', 'comments' ),
164
+ 'social_profile_theme' => 'theme-1',
165
+ 'counter_format' => 'comma',
166
+ 'cache_period' => '',
167
+ 'disable_font_css' => 0,
168
+ 'disable_frontend_css' => 0
169
+ );
170
+ return $apsc_settings;
171
+ }
172
+
173
+ /**
174
+ * AccessPress Social Counter Widget
175
+ */
176
+ function register_apsc_widget(){
177
+ register_widget( 'APSC_Widget' );
178
+ }
179
+
180
+ /**
181
+ * Adds Shortcode
182
+ */
183
+ function apsc_shortcode( $atts ){
184
+ ob_start();
185
+ include('inc/frontend/shortcode.php');
186
+ $html = ob_get_contents();
187
+ ob_get_clean();
188
+ return $html;
189
+ }
190
+
191
+ /**
192
+ * Clears the counter cache
193
+ */
194
+ function apsc_delete_cache(){
195
+ if ( ! empty( $_GET ) && wp_verify_nonce( $_GET[ '_wpnonce' ], 'apsc-cache-nonce' ) ) {
196
+ $transient_array = array( 'apsc_facebook', 'apsc_twitter', 'apsc_youtube', 'apsc_instagram', 'apsc_googlePlus', 'apsc_soundcloud', 'apsc_dribbble', 'apsc_posts', 'apsc_comments' );
197
+ foreach ( $transient_array as $transient ) {
198
+ delete_transient( $transient );
199
+ }
200
+ $_SESSION[ 'apsc_message' ] = __( 'Cache Deleted Successfully', 'accesspress-social-counter' );
201
+ wp_redirect( admin_url() . 'admin.php?page=ap-social-counter' );
202
+ }
203
+ }
204
+
205
+ /**
206
+ *
207
+ * @param type $user
208
+ * @param type $consumer_key
209
+ * @param type $consumer_secret
210
+ * @param type $oauth_access_token
211
+ * @param type $oauth_access_token_secret
212
+ * @return string
213
+ */
214
+ function authorization( $user, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret ){
215
+ $query = 'screen_name=' . $user;
216
+ $signature = $this -> signature( $query, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret );
217
+
218
+ return $this -> header( $signature );
219
+ }
220
+
221
+ /**
222
+ *
223
+ * @param type $url
224
+ * @param type $query
225
+ * @param type $method
226
+ * @param type $params
227
+ * @return type string
228
+ */
229
+ function signature_base_string( $url, $query, $method, $params ){
230
+ $return = array();
231
+ ksort( $params );
232
+
233
+ foreach ( $params as $key => $value ) {
234
+ $return[] = $key . '=' . $value;
235
+ }
236
+
237
+ return $method . "&" . rawurlencode( $url ) . '&' . rawurlencode( implode( '&', $return ) ) . '%26' . rawurlencode( $query );
238
+ }
239
+
240
+ /**
241
+ *
242
+ * @param type $query
243
+ * @param type $consumer_key
244
+ * @param type $consumer_secret
245
+ * @param type $oauth_access_token
246
+ * @param type $oauth_access_token_secret
247
+ * @return type array
248
+ */
249
+ function signature( $query, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret ){
250
+ $oauth = array(
251
+ 'oauth_consumer_key' => $consumer_key,
252
+ 'oauth_nonce' => hash_hmac( 'sha1', time(), true ),
253
+ 'oauth_signature_method' => 'HMAC-SHA1',
254
+ 'oauth_token' => $oauth_access_token,
255
+ 'oauth_timestamp' => time(),
256
+ 'oauth_version' => '1.0'
257
+ );
258
+ $api_url = 'https://api.twitter.com/1.1/users/show.json';
259
+ $base_info = $this -> signature_base_string( $api_url, $query, 'GET', $oauth );
260
+ $composite_key = rawurlencode( $consumer_secret ) . '&' . rawurlencode( $oauth_access_token_secret );
261
+ $oauth_signature = base64_encode( hash_hmac( 'sha1', $base_info, $composite_key, true ) );
262
+ $oauth[ 'oauth_signature' ] = $oauth_signature;
263
+
264
+ return $oauth;
265
+ }
266
+
267
+ /**
268
+ * Build the header.
269
+ *
270
+ * @param array $signature OAuth signature.
271
+ *
272
+ * @return string OAuth Authorization.
273
+ */
274
+ public function header( $signature ){
275
+ $return = 'OAuth ';
276
+ $values = array();
277
+
278
+ foreach ( $signature as $key => $value ) {
279
+ $values[] = $key . '="' . rawurlencode( $value ) . '"';
280
+ }
281
+
282
+ $return .= implode( ', ', $values );
283
+
284
+ return $return;
285
+ }
286
+
287
+ /**
288
+ * Returns twitter count
289
+ */
290
+ function get_twitter_count(){
291
+ $apsc_settings = $this -> apsc_settings;
292
+ $user = $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'username' ];
293
+ $api_url = 'https://api.twitter.com/1.1/users/show.json';
294
+ $params = array(
295
+ 'method' => 'GET',
296
+ 'sslverify' => false,
297
+ 'timeout' => 60,
298
+ 'headers' => array(
299
+ 'Content-Type' => 'application/x-www-form-urlencoded',
300
+ 'Authorization' => $this -> authorization(
301
+ $user, $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'consumer_key' ], $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'consumer_secret' ], $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'access_token' ], $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'access_token_secret' ]
302
+ )
303
+ )
304
+ );
305
+
306
+ $connection = wp_remote_get( $api_url . '?screen_name=' . $user, $params );
307
+ if ( is_wp_error( $connection ) ) {
308
+ $count = 0;
309
+ } else {
310
+ $_data = json_decode( $connection[ 'body' ], true );
311
+ if ( isset( $_data[ 'followers_count' ] ) ) {
312
+ $count = intval( $_data[ 'followers_count' ] );
313
+ } else {
314
+ $count = 0;
315
+ }
316
+ }
317
+ return $count;
318
+ }
319
+
320
+ /**
321
+ *
322
+ * @param int $count
323
+ * @param string $format
324
+ */
325
+ function get_formatted_count( $count, $format ){
326
+ if ( $count == '' ) {
327
+ return '';
328
+ }
329
+ switch ( $format ) {
330
+ case 'comma':
331
+ $count = number_format( $count );
332
+ break;
333
+ case 'short':
334
+ $count = $this -> abreviateTotalCount( $count );
335
+ break;
336
+ default:
337
+ break;
338
+ }
339
+ return $count;
340
+ }
341
+
342
+ /**
343
+ *
344
+ * @param integer $value
345
+ * @return string
346
+ */
347
+ function abreviateTotalCount( $value ){
348
+
349
+ $abbreviations = array( 12 => 'T', 9 => 'B', 6 => 'M', 3 => 'K', 0 => '' );
350
+
351
+ foreach ( $abbreviations as $exponent => $abbreviation ) {
352
+
353
+ if ( $value >= pow( 10, $exponent ) ) {
354
+
355
+ return round( floatval( $value / pow( 10, $exponent ) ), 1 ) . $abbreviation;
356
+ }
357
+ }
358
+ }
359
+
360
+ function facebook_count( $url ){
361
+
362
+ // Query in FQL
363
+ $fql = "SELECT like_count ";
364
+ $fql .= " FROM link_stat WHERE url = '$url'";
365
+
366
+ $fqlURL = "https://api.facebook.com/method/fql.query?format=json&query=" . urlencode( $fql );
367
+
368
+ // Facebook Response is in JSON
369
+ $response = wp_remote_get( $fqlURL );
370
+ $response = json_decode( $response[ 'body' ] );
371
+ if ( is_array( $response ) && isset( $response[ 0 ] -> like_count ) ) {
372
+ return $response[ 0 ] -> like_count;
373
+ } else {
374
+ $count = '0';
375
+ return $count;
376
+ }
377
+ }
378
+
379
+ function get_count( $social_media ){
380
+ include('inc/frontend/api.php');
381
+ return $count;
382
+ }
383
+
384
+ /**
385
+ *
386
+ * Counter Only Shortcode
387
+ * */
388
+ function apsc_count_shortcode( $atts ){
389
+ if ( isset( $atts[ 'social_media' ] ) ) {
390
+ $count = $this -> get_count( $atts[ 'social_media' ] );
391
+ if ( isset( $atts[ 'count_format' ] ) && $count != '' ) {
392
+ $count = $this -> get_formatted_count( $count, $atts[ 'count_format' ] );
393
+ }
394
+ return $count;
395
+ }
396
+ }
397
+
398
+ /**
399
+ * Get Facebook Access Token
400
+ * */
401
+ function get_fb_access_token(){
402
+ $apsc_settings = $this -> apsc_settings;
403
+ $api_url = 'https://graph.facebook.com/';
404
+ $url = sprintf(
405
+ '%soauth/access_token?client_id=%s&client_secret=%s&grant_type=client_credentials', $api_url, $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_id' ], $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_secret' ]
406
+ );
407
+ $access_token = wp_remote_get( $url, array( 'timeout' => 60 ) );
408
+
409
+ if ( is_wp_error( $access_token ) || ( isset( $access_token[ 'response' ][ 'code' ] ) && 200 != $access_token[ 'response' ][ 'code' ] ) ) {
410
+ return '';
411
+ } else {
412
+ return sanitize_text_field( $access_token[ 'body' ] );
413
+ }
414
+ }
415
+
416
+ /**
417
+ * Get New Facebook Count
418
+ * */
419
+ function new_fb_count(){
420
+ $apsc_settings = $this -> apsc_settings;
421
+ $facebook_method = ( isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] ) && $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] != '' ) ? $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] : '2';
422
+ if ( $facebook_method == '1' ) {
423
+ $access_token = $this -> get_fb_access_token();
424
+ $access_token = json_decode( $access_token );
425
+ $access_token = $access_token -> access_token;
426
+ $api_url = 'https://graph.facebook.com/v3.0/'; //not working
427
+ //$api_url = 'https://graph.facebook.com/v2.8/'; // not working
428
+ //$api_url = 'https://graph.facebook.com/v3.2/'; // not working
429
+ $url = sprintf(
430
+ '%s%s?fields=fan_count&access_token=%s', $api_url, $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'page_id' ], $access_token
431
+ );
432
+ } else {
433
+ $fb_page_id = (isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'fb_page_id' ] ) && ! empty( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'fb_page_id' ] )) ? $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'fb_page_id' ] : ' ';
434
+ $fb_access_token = (isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'access_token' ] ) && ! empty( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'access_token' ] )) ? $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'access_token' ] : ' ';
435
+
436
+ if ( $fb_access_token != '' && $fb_page_id != '' ) {
437
+ $api_url = 'https://graph.facebook.com/';
438
+ $url = sprintf(
439
+ '%s%s?fields=fan_count&access_token=%s', $api_url, $fb_page_id, $fb_access_token
440
+ );
441
+ } else {
442
+ $url = 'https://graph.facebook.com/';
443
+ }
444
+ }
445
+ $connection = wp_remote_get( $url, array( 'timeout' => 60 ) );
446
+
447
+ if ( is_wp_error( $connection ) || ( isset( $connection[ 'response' ][ 'code' ] ) && 200 != $connection[ 'response' ][ 'code' ] ) ) {
448
  $count = 0;
449
+ } else {
450
+ $_data = json_decode( $connection[ 'body' ], true );
451
+ if ( isset( $_data[ 'fan_count' ] ) ) {
452
+ $count = intval( $_data[ 'fan_count' ] );
453
+ } else {
454
+ $count = 0;
455
+ }
456
+ }
457
+ return $count;
458
+ }
459
+
460
+ }
461
+
462
+ $sc_object = new SC_Class(); //initialization of plugin
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
463
  }
inc/backend/boards/cache-settings.php CHANGED
@@ -1,11 +1,11 @@
1
  <div class="apsc-boards-tabs" id="apsc-board-cache-settings" style="display:none">
2
- <div class="apsc-tab-wrapper">
3
- <div class="apsc-option-inner-wrapper">
4
- <label><?php _e('Cache Period','accesspress-social-counter');?></label>
5
- <div class="apsc-option-field">
6
- <input type="number" name="cache_period" value="<?php echo $apsc_settings['cache_period'];?>" min="0"/>
7
- <div class="apsc-option-note"><?php _e('Please enter the time in hours in which the count should be updated.Default is 24 hours','accesspress-social-counter');?></div>
8
- </div>
9
- </div>
10
- </div>
11
  </div>
1
  <div class="apsc-boards-tabs" id="apsc-board-cache-settings" style="display:none">
2
+ <div class="apsc-tab-wrapper">
3
+ <div class="apsc-option-inner-wrapper">
4
+ <label><?php _e( 'Cache Period', 'accesspress-social-counter' ); ?></label>
5
+ <div class="apsc-option-field">
6
+ <input type="number" name="cache_period" value="<?php echo $apsc_settings[ 'cache_period' ]; ?>" min="0"/>
7
+ <div class="apsc-option-note"><?php _e( 'Please enter the time in hours in which the count should be updated.Default is 24 hours', 'accesspress-social-counter' ); ?></div>
8
+ </div>
9
+ </div>
10
+ </div>
11
  </div>
inc/backend/boards/display-settings.php CHANGED
@@ -1,83 +1,105 @@
1
  <div class="apsc-boards-tabs" id="apsc-board-display-settings" style="display: none">
2
- <div class="apsc-tab-wrapper">
3
- <div class="apsc-option-inner-wrapper">
4
- <label><?php _e('Social Profile Order', 'accesspress-social-counter'); ?></label>
5
- <div class="apsc-option-field">
6
- <ul class="apsc-sortable">
7
- <?php
8
- $social_profiles_ref = array('facebook' => 'Facebook',
9
- 'twitter' => 'Twitter',
10
- 'googlePlus' => 'Google Plus',
11
- 'instagram' => 'Instagram',
12
- 'soundcloud' => 'SoundCloud',
13
- 'dribbble' => 'Dribbble',
14
- 'youtube' => 'Youtube',
15
- 'posts' => 'Posts',
16
- 'comments' => 'Comments',
17
- );
18
- //$social_profiles = array('facebook','twitter','googlePlus','instagram','soundcloud','dribbble','youtube','posts','comments');
19
- $social_profiles = $apsc_settings['profile_order'];
20
- foreach ($social_profiles as $social_profile) {
21
- ?>
22
- <li><span class="left-icon"><i class="fa fa-arrows"></i></span><span class="social-name"><?php _e($social_profiles_ref[$social_profile], 'accesspress-social-counter'); ?></span>
23
- <input type="hidden" name="profile_order[]" value="<?php echo $social_profile; ?>"/>
24
- </li>
25
- <?php
26
- }
27
- ?>
28
- </ul>
29
- </div>
30
- </div>
31
- <div class="apsc-option-inner-wrapper">
32
- <label><?php _e('Choose Theme', 'accesspress-social-counter'); ?></label>
33
- <div class="apsc-option-field">
34
- <label>
35
- <input type="radio" name="social_profile_theme" value="theme-1" <?php if($apsc_settings['social_profile_theme']=='theme-1'){?>checked="checked"<?php }?>/><?php _e('Theme 1', 'accesspress-social-counter'); ?>
36
- <div class="apsc-theme-image"><img src="<?php echo SC_IMAGE_DIR.'/themes/theme-1.jpg';?>"/></div>
37
- </label>
38
- <label>
39
- <input type="radio" name="social_profile_theme" value="theme-2" <?php if($apsc_settings['social_profile_theme']=='theme-2'){?>checked="checked"<?php }?>/><?php _e('Theme 2', 'accesspress-social-counter'); ?>
40
- <div class="apsc-theme-image"><img src="<?php echo SC_IMAGE_DIR.'/themes/theme-2.jpg';?>"/></div>
41
- </label>
42
- <label>
43
- <input type="radio" name="social_profile_theme" value="theme-3" <?php if($apsc_settings['social_profile_theme']=='theme-3'){?>checked="checked"<?php }?>/><?php _e('Theme 3', 'accesspress-social-counter'); ?>
44
- <div class="apsc-theme-image"><img src="<?php echo SC_IMAGE_DIR.'/themes/theme-3.jpg';?>"/></div>
45
- </label>
46
- <label>
47
- <input type="radio" name="social_profile_theme" value="theme-4" <?php if($apsc_settings['social_profile_theme']=='theme-4'){?>checked="checked"<?php }?>/><?php _e('Theme 4', 'accesspress-social-counter'); ?>
48
- <div class="apsc-theme-image"><img src="<?php echo SC_IMAGE_DIR.'/themes/theme-4.jpg';?>"/></div>
49
- </label>
50
- <label>
51
- <input type="radio" name="social_profile_theme" value="theme-5" <?php if($apsc_settings['social_profile_theme']=='theme-5'){?>checked="checked"<?php }?>/><?php _e('Theme 5', 'accesspress-social-counter'); ?>
52
- <div class="apsc-theme-image"><img src="<?php echo SC_IMAGE_DIR.'/themes/theme-5.jpg';?>"/></div>
53
- </label>
54
- </div>
55
- </div>
56
- <div class="apsc-option-inner-wrapper">
57
- <label><?php _e('Counter Format','accesspress-social-counter');?></label>
58
- <div class="apsc-option-field">
59
- <label>
60
- <input type="radio" name="counter_format" value="default" <?php if(isset($apsc_settings['counter_format'])){checked($apsc_settings['counter_format'],'default');}?> checked="checked"/>12200
61
- </label>
62
- <label>
63
- <input type="radio" name="counter_format" value="comma" <?php if(isset($apsc_settings['counter_format'])){ checked($apsc_settings['counter_format'],'comma');}?>/>12,200
64
- </label>
65
- <label>
66
- <input type="radio" name="counter_format" value="short" <?php if(isset($apsc_settings['counter_format'])){ checked($apsc_settings['counter_format'],'short');}?>/>12.2K
67
- </label>
68
- </div>
69
- </div>
70
- <div class="apsc-option-inner-wrapper">
71
- <label><?php _e('Disable Font CSS','accesspress-social-counter');?></label>
72
- <div class="apsc-option-field">
73
- <label><input type="checkbox" name="disable_font_css" <?php echo (isset($apsc_settings['disable_font_css']) && $apsc_settings['disable_font_css']==1)?'checked="checked"':'';?>/><span class="apsc-option-trigger"><?php _e('Check if you want to disable the font awesome css of our plugin','accesspress-social-counter');?></span> </label>
74
  </div>
75
- </div>
76
- <div class="apsc-option-inner-wrapper">
77
- <label><?php _e('Disable Frontend CSS','accesspress-social-counter');?></label>
78
- <div class="apsc-option-field">
79
- <label><input type="checkbox" name="disable_frontend_css" <?php echo (isset($apsc_settings['disable_frontend_css']) && $apsc_settings['disable_frontend_css']==1)?'checked="checked"':'';?>/><span class="apsc-option-trigger"><?php _e('Check if you want to disable all the frontend css of our plugin','accesspress-social-counter');?></span> </label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  </div>
81
- </div>
82
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  </div>
1
  <div class="apsc-boards-tabs" id="apsc-board-display-settings" style="display: none">
2
+ <div class="apsc-tab-wrapper">
3
+ <div class="apsc-option-inner-wrapper">
4
+ <label><?php _e( 'Social Profile Order', 'accesspress-social-counter' ); ?></label>
5
+ <div class="apsc-option-field">
6
+ <ul class="apsc-sortable">
7
+ <?php
8
+ $social_profiles_ref = array( 'facebook' => 'Facebook',
9
+ 'twitter' => 'Twitter',
10
+ 'googlePlus' => 'Google Plus',
11
+ 'instagram' => 'Instagram',
12
+ 'soundcloud' => 'SoundCloud',
13
+ 'dribbble' => 'Dribbble',
14
+ 'youtube' => 'Youtube',
15
+ 'posts' => 'Posts',
16
+ 'comments' => 'Comments',
17
+ );
18
+ //$social_profiles = array('facebook','twitter','googlePlus','instagram','soundcloud','dribbble','youtube','posts','comments');
19
+ $social_profiles = $apsc_settings[ 'profile_order' ];
20
+ foreach ( $social_profiles as $social_profile ) {
21
+ ?>
22
+ <li><span class="left-icon"><i class="fa fa-arrows"></i></span><span class="social-name"><?php _e( $social_profiles_ref[ $social_profile ], 'accesspress-social-counter' ); ?></span>
23
+ <input type="hidden" name="profile_order[]" value="<?php echo $social_profile; ?>"/>
24
+ </li>
25
+ <?php
26
+ }
27
+ ?>
28
+ </ul>
29
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  </div>
31
+ <div class="apsc-option-inner-wrapper">
32
+ <label><?php _e( 'Choose Theme', 'accesspress-social-counter' ); ?></label>
33
+ <div class="apsc-option-field">
34
+ <label>
35
+ <input type="radio" name="social_profile_theme" value="theme-1" <?php if ( $apsc_settings[ 'social_profile_theme' ] == 'theme-1' ) { ?>checked="checked"<?php } ?>/><?php _e( 'Theme 1', 'accesspress-social-counter' ); ?>
36
+ <div class="apsc-theme-image"><img src="<?php echo SC_IMAGE_DIR . '/themes/theme-1.jpg'; ?>"/></div>
37
+ </label>
38
+ <label>
39
+ <input type="radio" name="social_profile_theme" value="theme-2" <?php if ( $apsc_settings[ 'social_profile_theme' ] == 'theme-2' ) { ?>checked="checked"<?php } ?>/><?php _e( 'Theme 2', 'accesspress-social-counter' ); ?>
40
+ <div class="apsc-theme-image"><img src="<?php echo SC_IMAGE_DIR . '/themes/theme-2.jpg'; ?>"/></div>
41
+ </label>
42
+ <label>
43
+ <input type="radio" name="social_profile_theme" value="theme-3" <?php if ( $apsc_settings[ 'social_profile_theme' ] == 'theme-3' ) { ?>checked="checked"<?php } ?>/><?php _e( 'Theme 3', 'accesspress-social-counter' ); ?>
44
+ <div class="apsc-theme-image"><img src="<?php echo SC_IMAGE_DIR . '/themes/theme-3.jpg'; ?>"/></div>
45
+ </label>
46
+ <label>
47
+ <input type="radio" name="social_profile_theme" value="theme-4" <?php if ( $apsc_settings[ 'social_profile_theme' ] == 'theme-4' ) { ?>checked="checked"<?php } ?>/><?php _e( 'Theme 4', 'accesspress-social-counter' ); ?>
48
+ <div class="apsc-theme-image"><img src="<?php echo SC_IMAGE_DIR . '/themes/theme-4.jpg'; ?>"/></div>
49
+ </label>
50
+ <label>
51
+ <input type="radio" name="social_profile_theme" value="theme-5" <?php if ( $apsc_settings[ 'social_profile_theme' ] == 'theme-5' ) { ?>checked="checked"<?php } ?>/><?php _e( 'Theme 5', 'accesspress-social-counter' ); ?>
52
+ <div class="apsc-theme-image"><img src="<?php echo SC_IMAGE_DIR . '/themes/theme-5.jpg'; ?>"/></div>
53
+ </label>
54
+ </div>
55
  </div>
56
+ <div class="apsc-option-inner-wrapper">
57
+ <label><?php _e( 'Counter Format', 'accesspress-social-counter' ); ?></label>
58
+ <div class="apsc-option-field">
59
+ <label>
60
+ <input type="radio" name="counter_format" value="default" <?php
61
+ if ( isset( $apsc_settings[ 'counter_format' ] ) ) {
62
+ checked( $apsc_settings[ 'counter_format' ], 'default' );
63
+ }
64
+ ?> checked="checked"/>12200
65
+ </label>
66
+ <label>
67
+ <input type="radio" name="counter_format" value="comma" <?php
68
+ if ( isset( $apsc_settings[ 'counter_format' ] ) ) {
69
+ checked( $apsc_settings[ 'counter_format' ], 'comma' );
70
+ }
71
+ ?>/>12,200
72
+ </label>
73
+ <label>
74
+ <input type="radio" name="counter_format" value="short" <?php
75
+ if ( isset( $apsc_settings[ 'counter_format' ] ) ) {
76
+ checked( $apsc_settings[ 'counter_format' ], 'short' );
77
+ }
78
+ ?>/>12.2K
79
+ </label>
80
+ </div>
81
+ </div>
82
+ <div class="apsc-option-inner-wrapper">
83
+ <label><?php _e( 'Disable Font CSS', 'accesspress-social-counter' ); ?></label>
84
+ <div class="apsc-option-field">
85
+ <label>
86
+ <input type="checkbox" name="disable_font_css" <?php echo (isset( $apsc_settings[ 'disable_font_css' ] ) && $apsc_settings[ 'disable_font_css' ] == 1) ? 'checked="checked"' : ''; ?>/>
87
+ <span class="apsc-option-trigger">
88
+ <?php _e( 'Check if you want to disable the font awesome css of our plugin', 'accesspress-social-counter' ); ?>
89
+ </span>
90
+ </label>
91
+ </div>
92
+ </div>
93
+ <div class="apsc-option-inner-wrapper">
94
+ <label><?php _e( 'Disable Frontend CSS', 'accesspress-social-counter' ); ?></label>
95
+ <div class="apsc-option-field">
96
+ <label>
97
+ <input type="checkbox" name="disable_frontend_css" <?php echo (isset( $apsc_settings[ 'disable_frontend_css' ] ) && $apsc_settings[ 'disable_frontend_css' ] == 1) ? 'checked="checked"' : ''; ?>/>
98
+ <span class="apsc-option-trigger">
99
+ <?php _e( 'Check if you want to disable all the frontend css of our plugin', 'accesspress-social-counter' ); ?>
100
+ </span>
101
+ </label>
102
+ </div>
103
+ </div>
104
+ </div>
105
  </div>
inc/backend/boards/social-profiles.php CHANGED
@@ -1,288 +1,456 @@
1
  <div class="apsc-boards-tabs" id="apsc-board-social-profile-settings">
2
-
3
- <div class="apsc-tab-wrapper">
4
- <!---Facebook-->
5
- <div class="apsc-option-outer-wrapper">
6
- <h4><?php _e('Facebook', 'accesspress-social-counter') ?></h4>
7
- <div class="apsc-option-inner-wrapper">
8
- <label><?php _e('Display Counter', 'accesspress-social-counter') ?></label>
9
- <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[facebook][active]" value="1" class="apsc-counter-activation-trigger" <?php if(isset($apsc_settings['social_profile']['facebook']['active'])){?>checked="checked"<?php } ?>/><?php _e('Show/Hide', 'accesspress-social-counter'); ?></label></div>
10
- </div>
11
- <div class="apsc-option-extra">
12
- <div class="apsc-option-inner-wrapper">
13
- <label><?php _e('Facebook Page ID', 'accesspress-social-counter'); ?></label>
14
  <div class="apsc-option-field">
15
- <input type="text" name="social_profile[facebook][page_id]" value="<?php echo esc_attr($apsc_settings['social_profile']['facebook']['page_id']);?>"/>
16
- <div class="apsc-option-note"><?php _e('Please enter the page ID or page name.For example:If your page url is https://www.facebook.com/AccessPressThemes then your page ID is AccessPressThemes.', 'accesspress-social-counter'); ?></div>
17
-
18
  </div>
19
- </div>
20
- <div class="apsc-option-inner-wrapper">
21
- <label><?php _e('Facebook App ID', 'accesspress-social-counter'); ?></label>
 
 
22
  <div class="apsc-option-field">
23
- <input type="text" name="social_profile[facebook][app_id]" value="<?php echo isset($apsc_settings['social_profile']['facebook']['app_id'])?esc_attr($apsc_settings['social_profile']['facebook']['app_id']):'';?>"/>
24
- <div class="apsc-option-note"><?php _e('Please go to <a href="https://developers.facebook.com/" target="_blank">https://developers.facebook.com/</a> and create an app and get the App ID', 'accesspress-social-counter'); ?></div>
25
-
 
 
 
 
 
 
 
 
26
  </div>
27
- </div>
28
- <div class="apsc-option-inner-wrapper">
29
- <label><?php _e('Facebook App Secret', 'accesspress-social-counter'); ?></label>
30
- <div class="apsc-option-field">
31
- <input type="text" name="social_profile[facebook][app_secret]" value="<?php echo isset($apsc_settings['social_profile']['facebook']['app_secret'])?esc_attr($apsc_settings['social_profile']['facebook']['app_secret']):'';?>"/>
32
- <div class="apsc-option-note"><?php _e('Please go to <a href="https://developers.facebook.com/" target="_blank">https://developers.facebook.com/</a> and create an app and get the App Secret', 'accesspress-social-counter'); ?></div>
33
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  </div>
35
- </div>
36
- <div class="apsc-option-inner-wrapper">
37
- <label><?php _e('Facebook Default Count', 'accesspress-social-counter'); ?></label>
38
- <div class="apsc-option-field">
39
- <input type="text" name="social_profile[facebook][default_count]" value="<?php echo isset($apsc_settings['social_profile']['facebook']['default_count'])?esc_attr($apsc_settings['social_profile']['facebook']['default_count']):'';?>"/>
40
- <div class="apsc-option-note"><?php _e('Please enter the default count for facebook to show whenever the API is unavailable.', 'accesspress-social-counter'); ?></div>
41
-
42
- </div>
43
- </div>
44
- </div>
45
- <div class="apsc-extra-note"><?php _e('Please use: [aps-get-count social_media="facebook"] to get the Facebook Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.');?></div>
46
- </div>
47
- <!---Facebook-->
48
-
49
- <!--Twitter-->
50
- <div class="apsc-option-outer-wrapper">
51
- <h4><?php _e('Twitter', 'accesspress-social-counter') ?></h4>
52
- <div class="apsc-option-inner-wrapper">
53
- <label><?php _e('Display Counter', 'accesspress-social-counter') ?></label>
54
- <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[twitter][active]" value="1" class="apsc-counter-activation-trigger" <?php if(isset($apsc_settings['social_profile']['twitter']['active'])){?>checked="checked"<?php } ?>/><?php _e('Show/Hide', 'accesspress-social-counter'); ?></label></div>
55
- </div>
56
- <div class="apsc-option-extra">
57
- <div class="apsc-option-inner-wrapper">
58
- <label><?php _e('Twitter Username', 'accesspress-social-counter'); ?></label>
59
- <div class="apsc-option-field">
60
- <input type="text" name="social_profile[twitter][username]" value="<?php echo esc_attr($apsc_settings['social_profile']['twitter']['username']);?>"/>
61
- <div class="apsc-option-note"><?php _e('Please enter the twitter username.For example:apthemes', 'accesspress-social-counter'); ?></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  </div>
63
- </div>
64
- <div class="apsc-option-inner-wrapper">
65
- <label><?php _e('Twitter Consumer Key', 'accesspress-social-counter'); ?></label>
66
- <div class="apsc-option-field">
67
- <input type="text" name="social_profile[twitter][consumer_key]" value="<?php echo esc_attr($apsc_settings['social_profile']['twitter']['consumer_key']);?>"/>
68
- <div class="apsc-option-note"><?php _e('Please create an app on Twitter through this link:', 'accesspress-social-counter'); ?><a href="https://dev.twitter.com/apps" target="_blank">https://dev.twitter.com/apps</a><?php _e(' and get this information.'); ?></div>
69
  </div>
70
- </div>
71
- <div class="apsc-option-inner-wrapper">
72
- <label><?php _e('Twitter Consumer Secret', 'accesspress-social-counter'); ?></label>
73
- <div class="apsc-option-field">
74
- <input type="text" name="social_profile[twitter][consumer_secret]" value="<?php echo esc_attr($apsc_settings['social_profile']['twitter']['consumer_secret']);?>"/>
75
- <div class="apsc-option-note"><?php _e('Please create an app on Twitter through this link:', 'accesspress-social-counter'); ?><a href="https://dev.twitter.com/apps" target="_blank">https://dev.twitter.com/apps </a><?php _e(' and get this information.'); ?></div>
76
  </div>
77
- </div>
78
- <div class="apsc-option-inner-wrapper">
79
- <label><?php _e('Twitter Access Token', 'accesspress-social-counter'); ?></label>
80
- <div class="apsc-option-field">
81
- <input type="text" name="social_profile[twitter][access_token]" value="<?php echo esc_attr($apsc_settings['social_profile']['twitter']['access_token']);?>"/>
82
- <div class="apsc-option-note"><?php _e('Please create an app on Twitter through this link:', 'accesspress-social-counter'); ?><a href="https://dev.twitter.com/apps" target="_blank">https://dev.twitter.com/apps </a><?php _e(' and get this information.'); ?></div>
83
  </div>
84
- </div>
85
- <div class="apsc-option-inner-wrapper">
86
- <label><?php _e('Twitter Access Token Secret', 'accesspress-social-counter'); ?></label>
 
87
  <div class="apsc-option-field">
88
- <input type="text" name="social_profile[twitter][access_token_secret]" value="<?php echo esc_attr($apsc_settings['social_profile']['twitter']['access_token_secret']);?>"/>
89
- <div class="apsc-option-note"><?php _e('Please create an app on Twitter through this link:', 'accesspress-social-counter'); ?><a href="https://dev.twitter.com/apps" target="_blank">https://dev.twitter.com/apps </a><?php _e(' and get this information.'); ?></div>
 
 
 
 
 
 
90
  </div>
91
- </div>
 
 
 
92
 
93
- </div>
94
- <div class="apsc-extra-note"><?php _e('Please use: [aps-get-count social_media="twitter"] to get the Twitter Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.');?></div>
95
- </div>
96
- <!--Twitter-->
97
-
98
- <!--Google Plus-->
99
- <div class="apsc-option-outer-wrapper">
100
- <h4><?php _e('Google Plus', 'accesspress-social-counter'); ?></h4>
101
- <div class="apsc-option-inner-wrapper">
102
- <label><?php _e('Display Counter', 'accesspress-social-counter') ?></label>
103
- <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[googlePlus][active]" value="1" class="apsc-counter-activation-trigger" <?php if(isset($apsc_settings['social_profile']['googlePlus']['active'])){?>checked="checked"<?php } ?>/><?php _e('Show/Hide', 'accesspress-social-counter'); ?></label></div>
104
- </div>
105
- <div class="apsc-option-extra">
106
- <div class="apsc-option-inner-wrapper">
107
- <label><?php _e('Google Plus Page Name or Profile ID', 'accesspress-social-counter'); ?></label>
108
  <div class="apsc-option-field">
109
- <input type="text" name="social_profile[googlePlus][page_id]" value="<?php echo esc_attr($apsc_settings['social_profile']['googlePlus']['page_id']);?>"/>
110
- <div class="apsc-option-note"><?php _e('Please enter the page name or profile ID.For example:If your page url is https://plus.google.com/+BBCNews then your page name is +BBCNews', 'accesspress-social-counter'); ?></div>
 
111
  </div>
112
- </div>
113
- <div class="apsc-option-inner-wrapper">
114
- <label><?php _e('Google API Key', 'accesspress-social-counter'); ?></label>
115
- <div class="apsc-option-field">
116
- <input type="text" name="social_profile[googlePlus][api_key]" value="<?php echo esc_attr($apsc_settings['social_profile']['googlePlus']['api_key']);?>"/>
117
- <div class="apsc-option-note">
118
- <p><?php _e('To get your API Key, please go to <a href="https://console.developers.google.com/project" target="_blank">https://console.developers.google.com/project</a> and follow below steps.','accesspress-social-counter');?></p>
119
- <ol>
120
- <li> <?php _e('Click on create project.','accesspress-social-counter');?></li>
121
- <li> <?php _e('Enter project name and click create, A new page will load with newly created app dashboard.','accesspress-social-counter');?></li>
122
- <li> <?php _e('In the blue API box click on "Enable and manage APIs".','accesspress-social-counter');?></li>
123
- <li> <?php _e('Enable google+ api by clicking on it.','accesspress-social-counter');?></li>
124
- <li> <?php _e('Now click on credentials tab.','accesspress-social-counter');?></li>
125
- <li> <?php _e('When you click on "Create Credentials" button, options will appear.','accesspress-social-counter');?></li>
126
- <li> <?php _e('Now click on API key, a popup will appear.','accesspress-social-counter');?></li>
127
- <li> <?php _e('Now click on Browser key.','accesspress-social-counter');?></li>
128
- <li> <?php _e('Copy the browser key and paste in the above field.','accesspress-social-counter');?></li>
129
- </ol>
130
- <p class="description">
131
- <?php _e('If still, the count is not displaying then there may be a privacy issue within the google+ account.You may need to public some of your settings in it.Please chek in the below screenshot:','accesspress-social-counter');?>
132
- </p>
133
- <a href="https://i.imgur.com/4zbtqKH.png" target="_blank">https://i.imgur.com/4zbtqKH.png</a>
134
- </div>
135
- </div>
136
- </div>
137
- </div>
138
- <div class="apsc-extra-note"><?php _e('Please use: [aps-get-count social_media="googlePlus"] to get the Google Plus Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.');?></div>
139
- </div>
140
- <!--Google Plus-->
141
-
142
- <!--Instagram-->
143
- <div class="apsc-option-outer-wrapper">
144
- <h4><?php _e('Instagram', 'accesspress-social-counter') ?></h4>
145
- <div class="apsc-option-inner-wrapper">
146
- <label><?php _e('Display Counter', 'accesspress-social-counter') ?></label>
147
- <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[instagram][active]" value="1" class="apsc-counter-activation-trigger" <?php if(isset($apsc_settings['social_profile']['instagram']['active'])){?>checked="checked"<?php } ?>/><?php _e('Show/Hide', 'accesspress-social-counter'); ?></label></div>
148
- </div>
149
- <div class="apsc-option-extra">
150
- <div class="apsc-option-inner-wrapper">
151
- <label><?php _e('Instagram Username', 'accesspress-social-counter'); ?></label>
152
- <div class="apsc-option-field">
153
- <input type="text" name="social_profile[instagram][username]" value="<?php echo esc_attr($apsc_settings['social_profile']['instagram']['username']);?>"/>
154
- <div class="apsc-option-note"><?php _e('Please enter the instagram username', 'accesspress-social-counter'); ?></div>
155
  </div>
156
- </div>
157
- <div class="apsc-option-inner-wrapper">
158
- <label><?php _e('Instagram User ID', 'accesspress-social-counter'); ?></label>
159
- <div class="apsc-option-field">
160
- <input type="text" name="social_profile[instagram][user_id]" value="<?php echo esc_attr($apsc_settings['social_profile']['instagram']['user_id']);?>"/>
161
- <div class="apsc-option-note"><?php _e('Please enter the instagram user ID.You can get this information from <a href="http://www.pinceladasdaweb.com.br/instagram/access-token/" target="_blank">http://www.pinceladasdaweb.com.br/instagram/access-token/</a>', 'accesspress-social-counter'); ?></div>
 
 
162
  </div>
163
- </div>
164
- <div class="apsc-option-inner-wrapper">
165
- <label><?php _e('Instagram Access Token', 'accesspress-social-counter'); ?></label>
166
- <div class="apsc-option-field">
167
- <input type="text" name="social_profile[instagram][access_token]" value="<?php echo esc_attr($apsc_settings['social_profile']['instagram']['access_token']);?>"/>
168
- <div class="apsc-option-note"><?php _e('Please enter the instagram Access Token.You can get this information from <a href="http://instagram.pixelunion.net/" target="_blank">http://instagram.pixelunion.net/</a>', 'accesspress-social-counter'); ?></div>
169
- </div>
170
- </div>
171
- </div>
172
- <div class="apsc-extra-note"><?php _e('Please use: [aps-get-count social_media="instagram"] to get the Instagram Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.');?></div>
173
- </div>
174
- <!--Instagram-->
175
-
176
- <!--Youtube-->
177
- <div class="apsc-option-outer-wrapper">
178
- <h4><?php _e('Youtube', 'accesspress-social-counter') ?></h4>
179
- <div class="apsc-option-inner-wrapper">
180
- <label><?php _e('Display Counter', 'accesspress-social-counter') ?></label>
181
- <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[youtube][active]" value="1" class="apsc-counter-activation-trigger" <?php if(isset($apsc_settings['social_profile']['youtube']['active'])){?>checked="checked"<?php } ?>/><?php _e('Show/Hide', 'accesspress-social-counter'); ?></label></div>
182
- </div>
183
- <div class="apsc-option-extra">
184
- <div class="apsc-option-inner-wrapper">
185
- <label><?php _e('Youtube Channel ID', 'accesspress-social-counter'); ?></label>
186
- <div class="apsc-option-field">
187
- <input type="text" name="social_profile[youtube][channel_id]" value="<?php echo isset($apsc_settings['social_profile']['youtube']['channel_id'])?esc_attr($apsc_settings['social_profile']['youtube']['channel_id']):'';?>"/>
188
- <div class="apsc-option-note"><?php _e('Please enter the youtube channel ID.Your channel ID looks like: UC4WMyzBds5sSZcQxyAhxJ8g. And please note that your channel ID is different from username.Please go <a href="https://support.google.com/youtube/answer/3250431?hl=en" target="_blank">here</a> to know how to get your channel ID.', 'accesspress-social-counter'); ?></div>
189
  </div>
190
- </div>
191
- <div class="apsc-option-inner-wrapper">
192
- <label><?php _e('Youtube Channel URL', 'accesspress-social-counter'); ?></label>
193
- <div class="apsc-option-field">
194
- <input type="text" name="social_profile[youtube][channel_url]" value="<?php echo esc_attr($apsc_settings['social_profile']['youtube']['channel_url']);?>"/>
195
- <div class="apsc-option-note"><?php _e('Please enter the youtube channel URL.For example:https://www.youtube.com/user/accesspressthemes', 'accesspress-social-counter'); ?></div>
 
 
 
 
196
  </div>
197
- </div>
198
- <div class="apsc-option-inner-wrapper">
199
- <label><?php _e('Youtube API Key', 'accesspress-social-counter'); ?></label>
200
- <div class="apsc-option-field">
201
- <input type="text" name="social_profile[youtube][api_key]" value="<?php echo isset($apsc_settings['social_profile']['youtube']['api_key'])?esc_attr($apsc_settings['social_profile']['youtube']['api_key']):'';?>"/>
202
- <div class="apsc-option-note"><?php _e('To get your API Key, first create a project/app in <a href="https://console.developers.google.com/project" target="_blank">https://console.developers.google.com/project</a> and then turn on both Youtube Data and Analytics API from "APIs & auth >APIs inside your project.Then again go to "APIs & auth > APIs > Credentials > Public API access" and then click "CREATE A NEW KEY" button, select the "Browser key" option and click in the "CREATE" button, and then copy your API key and paste in above field.', 'accesspress-social-counter'); ?></div>
 
 
 
 
203
  </div>
204
- </div>
205
- <div class="apsc-option-inner-wrapper">
206
- <label><?php _e('Default Subscribers Count', 'accesspress-social-counter'); ?></label>
207
- <div class="apsc-option-field">
208
- <input type="text" name="social_profile[youtube][subscribers_count]" value="<?php echo isset($apsc_settings['social_profile']['youtube']['subscribers_count'])?esc_attr($apsc_settings['social_profile']['youtube']['subscribers_count']):0;?>"/>
209
- <div class="apsc-option-note"><?php _e('Please enter total number of subscribers that your youtube channel has in case the API fetching is failed for automatic update.', 'accesspress-social-counter'); ?></div>
210
- </div>
211
- </div>
212
- </div>
213
- <div class="apsc-extra-note"><?php _e('Please use: [aps-get-count social_media="youtube"] to get the Youtube Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.');?></div>
214
- </div>
215
- <!--Youtube-->
216
-
217
- <!--Sound Cloud-->
218
- <div class="apsc-option-outer-wrapper">
219
- <h4><?php _e('Sound Cloud', 'accesspress-social-counter') ?></h4>
220
- <div class="apsc-option-inner-wrapper">
221
- <label><?php _e('Display Counter', 'accesspress-social-counter') ?></label>
222
- <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[soundcloud][active]" value="1" class="apsc-counter-activation-trigger" <?php if(isset($apsc_settings['social_profile']['soundcloud']['active'])){?>checked="checked"<?php } ?>/><?php _e('Show/Hide', 'accesspress-social-counter'); ?></label></div>
223
- </div>
224
- <div class="apsc-option-extra">
225
- <div class="apsc-option-inner-wrapper">
226
- <label><?php _e('SoundCloud Username', 'accesspress-social-counter'); ?></label>
227
- <div class="apsc-option-field">
228
- <input type="text" name="social_profile[soundcloud][username]" value="<?php echo $apsc_settings['social_profile']['soundcloud']['username'];?>"/>
229
- <div class="apsc-option-note"><?php _e('Please enter the SoundCloud username.For example:bchettri', 'accesspress-social-counter'); ?></div>
 
 
230
  </div>
231
- </div>
232
- <div class="apsc-option-inner-wrapper">
233
- <label><?php _e('SoundCloud Client ID', 'accesspress-social-counter'); ?></label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
  <div class="apsc-option-field">
235
- <input type="text" name="social_profile[soundcloud][client_id]" value="<?php echo esc_attr($apsc_settings['social_profile']['soundcloud']['client_id']);?>"/>
236
- <div class="apsc-option-note"><?php _e('Please enter the SoundCloud APP Client ID.You can get this information from <a href="http://soundcloud.com/you/apps/new">http://soundcloud.com/you/apps/new</a> after creating a new app', 'accesspress-social-counter'); ?></div>
237
- </div>
238
- </div>
239
- </div>
240
- <div class="apsc-extra-note"><?php _e('Please use: [aps-get-count social_media="soundcloud"] to get the SoundCloud Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.');?></div>
241
- </div>
242
- <!--Sound Cloud-->
243
-
244
- <!--Dribbble-->
245
- <div class="apsc-option-outer-wrapper">
246
- <h4><?php _e('Dribbble', 'accesspress-social-counter') ?></h4>
247
- <div class="apsc-option-inner-wrapper">
248
- <label><?php _e('Display Counter', 'accesspress-social-counter') ?></label>
249
- <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[dribbble][active]" value="1" class="apsc-counter-activation-trigger" <?php if(isset($apsc_settings['social_profile']['dribbble']['active'])){?>checked="checked"<?php } ?>/><?php _e('Show/Hide', 'accesspress-social-counter'); ?></label></div>
250
- </div>
251
- <div class="apsc-option-extra">
252
- <div class="apsc-option-inner-wrapper">
253
- <label><?php _e('Dribbble Username', 'accesspress-social-counter'); ?></label>
254
  <div class="apsc-option-field">
255
- <input type="text" name="social_profile[dribbble][username]" value="<?php echo esc_attr($apsc_settings['social_profile']['dribbble']['username']);?>"/>
256
- <div class="apsc-option-note"><?php _e('Please enter your dribbble username.For example:Creativedash', 'accesspress-social-counter'); ?></div>
257
- </div>
258
- </div>
259
- </div>
260
- <div class="apsc-extra-note"><?php _e('Please use: [aps-get-count social_media="dribbble"] to get the Dribbble Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.');?></div>
261
- </div>
262
- <!--Dribbble-->
263
-
264
- <!--Posts-->
265
- <div class="apsc-option-outer-wrapper">
266
- <h4><?php _e("Posts",'accesspress-social-counter')?></h4>
267
- <div class="apsc-option-inner-wrapper">
268
- <label><?php _e('Display Counter','accesspress-social-counter');?></label>
269
- <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[posts][active]" value="1" class="apsc-counter-activation-trigger" <?php if(isset($apsc_settings['social_profile']['posts']['active'])){?>checked="checked"<?php } ?>/><?php _e('Show/Hide', 'accesspress-social-counter'); ?></label></div>
270
- </div>
271
- <div class="apsc-extra-note"><?php _e('Please use: [aps-get-count social_media="posts"] to get the Posts Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.');?></div>
272
- </div>
273
- <!--Posts-->
274
-
275
- <!--Comments-->
276
- <div class="apsc-option-outer-wrapper">
277
- <h4><?php _e("Comments",'accesspress-social-counter');?></h4>
278
- <div class="apsc-option-inner-wrapper">
279
- <label><?php _e('Display Counter','accesspress-social-counter');?></label>
280
- <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[comments][active]" value="1" class="apsc-counter-activation-trigger" <?php if(isset($apsc_settings['social_profile']['comments']['active'])){?>checked="checked"<?php } ?>/><?php _e('Show/Hide', 'accesspress-social-counter'); ?></label></div>
281
- </div>
282
- <div class="apsc-extra-note"><?php _e('Please use: [aps-get-count social_media="comments"] to get the Comments Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.');?></div>
283
- </div>
284
- <!--Comments-->
285
-
286
- </div>
287
 
288
  </div>
1
  <div class="apsc-boards-tabs" id="apsc-board-social-profile-settings">
2
+ <div class="apsc-tab-wrapper">
3
+ <!---Facebook-->
4
+ <div class="apsc-option-outer-wrapper">
5
+ <h4><?php _e( 'Facebook', 'accesspress-social-counter' ) ?></h4>
6
+ <div class="apsc-option-inner-wrapper">
7
+ <label><?php _e( 'Display Counter', 'accesspress-social-counter' ) ?></label>
 
 
 
 
 
 
8
  <div class="apsc-option-field">
9
+ <label>
10
+ <input type="checkbox" name="social_profile[facebook][active]" value="1" class="apsc-counter-activation-trigger" <?php if ( isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'active' ] ) ) { ?>checked="checked"<?php } ?>/><?php _e( 'Show/Hide', 'accesspress-social-counter' ); ?>
11
+ </label>
12
  </div>
13
+ </div>
14
+ <div class="apsc-option-inner-wrapper ">
15
+ <label for="apsc-facebook-method">
16
+ <?php _e( 'Facebook Counter Extraction', 'ap-social-pro' ) ?>
17
+ </label>
18
  <div class="apsc-option-field">
19
+ <label class="apsc-fb-method">
20
+ <input type="radio" name="social_profile[facebook][method]" value="1" class="apss-facebook-method" id="" <?php echo isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] ) && $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] == '1' ? ' checked="checked" ' : '1111'; ?>/>
21
+ <?php _e( 'Method 1', 'ap-social-pro' ); ?>
22
+ </label>
23
+ <div class="apsc-option-note"><?php _e( 'Method 1 you will require to enter your app id and app secret. Due to recent changes in Facebook API, most of our clients have been complaining that "Method 1" does not work. ', 'ap-social-pro' ); ?></div>
24
+
25
+ <label class="apsc-fb-method">
26
+ <input type="radio" name="social_profile[facebook][method]" value="2" class="apss-facebook-method" id="" <?php echo isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] ) && $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] == '2' ? 'checked="checked"' : '2222'; ?>/>
27
+ <?php _e( 'Method 2', 'ap-social-pro' ); ?>
28
+ </label>
29
+ <div class="apsc-option-note"><?php _e( 'Method 2 makes use of a third party API "WidgetPack" to do the work. Please login to your Facebook account using the "FB Connect" button and connect WidgetPack to Facebook. Once done, you will notice that the image and name of your page will be displayed beneath the "FB Connect" button in the plugin settings. When you click on it, All the details will automatically be entered in the fields beneath the "FB Connect Button". Note: Your FB login details will NOT be stored.', 'ap-social-pro' ); ?></div>
30
  </div>
31
+ </div>
32
+ <div class="apss-facebook-method-1" id="apss-facebook-method-1" <?php echo ( isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] ) && $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] == '1' ) ? 'style=display:block;' : 'style=display:none;'; ?>>
33
+ <div class="apsc-option-extra">
34
+ <div class="apsc-option-inner-wrapper">
35
+ <label><?php _e( 'Facebook Page ID', 'accesspress-social-counter' ); ?></label>
36
+ <div class="apsc-option-field">
37
+ <input type="text" name="social_profile[facebook][page_id]" value="<?php echo esc_attr( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'page_id' ] ); ?>"/>
38
+ <div class="apsc-option-note"><?php _e( 'Please enter the page ID or page name.For example:If your page url is https://www.facebook.com/AccessPressThemes then your page ID is AccessPressThemes.', 'accesspress-social-counter' ); ?>
39
+ </div>
40
+
41
+ </div>
42
+ </div>
43
+ <div class="apsc-option-inner-wrapper">
44
+ <label><?php _e( 'Facebook App ID', 'accesspress-social-counter' ); ?></label>
45
+ <div class="apsc-option-field">
46
+ <input type="text" name="social_profile[facebook][app_id]" value="<?php echo isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_id' ] ) ? esc_attr( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_id' ] ) : ''; ?>"/>
47
+ <div class="apsc-option-note"><?php _e( 'Please go to <a href="https://developers.facebook.com/" target="_blank">https://developers.facebook.com/</a> and create an app and get the App ID', 'accesspress-social-counter' ); ?>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ <div class="apsc-option-inner-wrapper">
52
+ <label><?php _e( 'Facebook App Secret', 'accesspress-social-counter' ); ?></label>
53
+ <div class="apsc-option-field">
54
+ <input type="text" name="social_profile[facebook][app_secret]" value="<?php echo isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_secret' ] ) ? esc_attr( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_secret' ] ) : ''; ?>"/>
55
+ <div class="apsc-option-note"><?php _e( 'Please go to <a href="https://developers.facebook.com/" target="_blank">https://developers.facebook.com/</a> and create an app and get the App Secret', 'accesspress-social-counter' ); ?>
56
+ </div>
57
+ </div>
58
+ </div>
59
  </div>
60
+ </div>
61
+ <div class="apss-facebook-method-2" id="apss-facebook-method-2" <?php echo ( isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] ) && $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] == '2' ) ? 'style=display:block;' : 'style=display:none;'; ?>>
62
+ <style>
63
+ .apsc-main-wrap .apsc-fb-pages-list{
64
+ width: 60%;
65
+ }
66
+
67
+ .apsc-fb-pages-list .apsc-page:hover
68
+ {
69
+ pointer: cusor;
70
+ background-color: #eee;
71
+ }
72
+
73
+ .apsc-fb-pages-list .apsc-page .apsc-page-photo
74
+ {
75
+ float:left;
76
+ }
77
+ .apsc-fb-pages-list .apsc-page .apsc-page-name
78
+ {
79
+ width: 50%;
80
+ float: left;
81
+ margin-left: 5px;
82
+ }
83
+ .apsc-page-photo{
84
+ height: 55px;
85
+ width:55px;
86
+ }
87
+
88
+ .apsc-fb-pages-list .apsc-page {
89
+ width: 25%;
90
+ margin-top: 10px;
91
+ float: left;
92
+ display: flex;
93
+ -webkit-align-items: center;
94
+ align-items: center;
95
+ cursor: pointer;
96
+ margin-right: 20px;
97
+ }
98
+ </style>
99
+ <div class="apsc-option-inner-wrapper apsc-row-even">
100
+ <label><?php _e( 'Facebook Login', 'ap-social-pro' ); ?></label>
101
+ <div class="apsc-option-field">
102
+ <button type="button" id="apsc_fb_connect"><?php _e( 'FB Connect', 'ap-social-pro' ); ?></button>
103
+ <div class="apsc-fb-pages-list"></div>
104
+ </div>
105
  </div>
106
+ <div class="apsc-option-inner-wrapper apsc-row-even">
107
+ <label><?php _e( 'Page Name', 'ap-social-pro' ); ?></label>
108
+ <div class="apsc-option-field">
109
+ <input type="text" id="" class="apsc-page-name" name="social_profile[facebook][page_name]" value="<?php (isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'page_name' ] ) && ! empty( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'page_name' ] )) ? esc_attr_e( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'page_name' ] ) : ''; ?>" class="apsc-page-name" placeholder="<?php _e( 'Page Name', 'ap-social-pro' ); ?>" readonly />
110
+ <div class="apsc-option-note"><?php _e( ' ', 'ap-social-pro' ); ?></div>
111
+ </div>
112
  </div>
113
+ <div class="apsc-option-inner-wrapper apsc-row-even">
114
+ <label><?php _e( 'Page ID', 'ap-social-pro' ); ?></label>
115
+ <div class="apsc-option-field">
116
+ <input type="text" class="apsc-page-id" id="" name="social_profile[facebook][fb_page_id]" value="<?php (isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'fb_page_id' ] ) && ! empty( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'fb_page_id' ] )) ? esc_attr_e( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'fb_page_id' ] ) : ''; ?>" class="apsc-page-name" placeholder="<?php _e( 'Page ID', 'ap-social-pro' ); ?>" readonly />
117
+ <div class="apsc-option-note"><?php _e( ' ', 'ap-social-pro' ); ?></div>
118
+ </div>
119
  </div>
120
+ <div class="apsc-option-inner-wrapper apsc-row-even">
121
+ <label><?php _e( 'Access Token', 'ap-social-pro' ); ?></label>
122
+ <div class="apsc-option-field">
123
+ <input type="text" id="" class="apsc-page-token" name="social_profile[facebook][access_token]" value="<?php (isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'access_token' ] ) && ! empty( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'access_token' ] )) ? esc_attr_e( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'access_token' ] ) : ''; ?>" class="apsc-page-name" placeholder="<?php _e( 'Access Token', 'ap-social-pro' ); ?>" readonly />
124
+ <div class="apsc-option-note"><?php _e( ' ', 'ap-social-pro' ); ?></div>
125
+ </div>
126
  </div>
127
+ <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-widget-id="<?php echo 'apss-facebook-method-2'; ?>" onload="fbrev_init({widgetId: this.getAttribute('data-widget-id')})" style="display:none">
128
+ </div>
129
+ <div class="apsc-option-inner-wrapper apsc-row-odd">
130
+ <label><?php _e( 'Default Count', 'ap-social-pro' ); ?></label>
131
  <div class="apsc-option-field">
132
+ <input type="text" name="social_profile[facebook][default_count]" value="<?php
133
+ if ( isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'default_count' ] ) ) {
134
+ echo $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'default_count' ];
135
+ } else {
136
+ echo '';
137
+ }
138
+ ?>"/>
139
+ <div class="apsc-option-note"><?php _e( 'Please enter the default count to show instead of 0 when API\'s are not available.', 'ap-social-pro' ); ?></div>
140
  </div>
141
+ </div>
142
+ <div class="apsc-extra-note"><?php _e( 'Please use: [aps-get-count social_media="facebook"] to get the Facebook Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.' ); ?></div>
143
+ </div>
144
+ <!---Facebook-->
145
 
146
+ <!--Twitter-->
147
+ <div class="apsc-option-outer-wrapper">
148
+ <h4><?php _e( 'Twitter', 'accesspress-social-counter' ) ?></h4>
149
+ <div class="apsc-option-inner-wrapper">
150
+ <label><?php _e( 'Display Counter', 'accesspress-social-counter' ) ?></label>
 
 
 
 
 
 
 
 
 
 
151
  <div class="apsc-option-field">
152
+ <label>
153
+ <input type="checkbox" name="social_profile[twitter][active]" value="1" class="apsc-counter-activation-trigger" <?php if ( isset( $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'active' ] ) ) { ?>checked="checked"<?php } ?>/><?php _e( 'Show/Hide', 'accesspress-social-counter' ); ?>
154
+ </label>
155
  </div>
156
+ </div>
157
+ <div class="apsc-option-extra">
158
+ <div class="apsc-option-inner-wrapper">
159
+ <label><?php _e( 'Twitter Username', 'accesspress-social-counter' ); ?></label>
160
+ <div class="apsc-option-field">
161
+ <input type="text" name="social_profile[twitter][username]" value="<?php echo esc_attr( $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'username' ] ); ?>"/>
162
+ <div class="apsc-option-note">
163
+ <?php _e( 'Please enter the twitter username.For example:apthemes', 'accesspress-social-counter' ); ?>
164
+ </div>
165
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  </div>
167
+ <div class="apsc-option-inner-wrapper">
168
+ <label><?php _e( 'Twitter Consumer Key', 'accesspress-social-counter' ); ?></label>
169
+ <div class="apsc-option-field">
170
+ <input type="text" name="social_profile[twitter][consumer_key]" value="<?php echo esc_attr( $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'consumer_key' ] ); ?>"/>
171
+ <div class="apsc-option-note">
172
+ <?php _e( 'Please create an app on Twitter through this link:', 'accesspress-social-counter' ); ?><a href="https://dev.twitter.com/apps" target="_blank">https://dev.twitter.com/apps</a><?php _e( ' and get this information.' ); ?>
173
+ </div>
174
+ </div>
175
  </div>
176
+ <div class="apsc-option-inner-wrapper">
177
+ <label><?php _e( 'Twitter Consumer Secret', 'accesspress-social-counter' ); ?></label>
178
+ <div class="apsc-option-field">
179
+ <input type="text" name="social_profile[twitter][consumer_secret]" value="<?php echo esc_attr( $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'consumer_secret' ] ); ?>"/>
180
+ <div class="apsc-option-note">
181
+ <?php _e( 'Please create an app on Twitter through this link:', 'accesspress-social-counter' ); ?>
182
+ <a href="https://dev.twitter.com/apps" target="_blank">https://dev.twitter.com/apps </a>
183
+ <?php _e( ' and get this information.' ); ?>
184
+ </div>
185
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  </div>
187
+ <div class="apsc-option-inner-wrapper">
188
+ <label><?php _e( 'Twitter Access Token', 'accesspress-social-counter' ); ?></label>
189
+ <div class="apsc-option-field">
190
+ <input type="text" name="social_profile[twitter][access_token]" value="<?php echo esc_attr( $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'access_token' ] ); ?>"/>
191
+ <div class="apsc-option-note">
192
+ <?php _e( 'Please create an app on Twitter through this link:', 'accesspress-social-counter' ); ?>
193
+ <a href="https://dev.twitter.com/apps" target="_blank">https://dev.twitter.com/apps </a>
194
+ <?php _e( ' and get this information.' ); ?>
195
+ </div>
196
+ </div>
197
  </div>
198
+ <div class="apsc-option-inner-wrapper">
199
+ <label><?php _e( 'Twitter Access Token Secret', 'accesspress-social-counter' ); ?></label>
200
+ <div class="apsc-option-field">
201
+ <input type="text" name="social_profile[twitter][access_token_secret]" value="<?php echo esc_attr( $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'access_token_secret' ] ); ?>"/>
202
+ <div class="apsc-option-note">
203
+ <?php _e( 'Please create an app on Twitter through this link:', 'accesspress-social-counter' ); ?>
204
+ <a href="https://dev.twitter.com/apps" target="_blank">https://dev.twitter.com/apps </a>
205
+ <?php _e( ' and get this information.' ); ?>
206
+ </div>
207
+ </div>
208
  </div>
209
+ <div class="apsc-option-inner-wrapper apsc-row-odd">
210
+ <label><?php _e( 'Default Count', 'ap-social-pro' ); ?></label>
211
+ <div class="apsc-option-field">
212
+ <input type="text" name="social_profile[twitter][default_count]" value="<?php echo isset( $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'default_count' ] ) && $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'default_count' ] != '' ? $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'default_count' ] : ''; ?>"/>
213
+ <div class="apsc-option-note"><?php _e( 'Please enter the default count to show instead of 0 when API\'s are not available.', 'ap-social-pro' ); ?></div>
214
+ </div>
215
+ </div>
216
+ </div>
217
+ <div class="apsc-extra-note"><?php _e( 'Please use: [aps-get-count social_media="twitter"] to get the Twitter Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.' ); ?></div>
218
+ </div>
219
+ <!--Twitter-->
220
+
221
+ <!--Google Plus-->
222
+ <div class="apsc-option-outer-wrapper">
223
+ <h4><?php _e( 'Google Plus', 'accesspress-social-counter' ); ?></h4>
224
+ <div class="apsc-extra-note"><?php _e( 'Please be informed that Google has officially started the process of shutting down and deleting all consumer accounts on its Google+ social network platform' ); ?></div>
225
+
226
+ <div class="apsc-option-inner-wrapper">
227
+ <label><?php _e( 'Display Counter', 'accesspress-social-counter' ) ?></label>
228
+ <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[googlePlus][active]" value="1" class="apsc-counter-activation-trigger" <?php if ( isset( $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'active' ] ) ) { ?>checked="checked"<?php } ?>/><?php _e( 'Show/Hide', 'accesspress-social-counter' ); ?></label></div>
229
+ </div>
230
+ <div class="apsc-option-extra">
231
+ <div class="apsc-option-inner-wrapper">
232
+ <label><?php _e( 'Google Plus Page Name or Profile ID', 'accesspress-social-counter' ); ?></label>
233
+ <div class="apsc-option-field">
234
+ <input type="text" name="social_profile[googlePlus][page_id]" value="<?php echo esc_attr( $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'page_id' ] ); ?>"/>
235
+ <div class="apsc-option-note"><?php _e( 'Please enter the page name or profile ID.For example:If your page url is https://plus.google.com/+BBCNews then your page name is +BBCNews', 'accesspress-social-counter' ); ?></div>
236
+ </div>
237
  </div>
238
+ <div class="apsc-option-inner-wrapper">
239
+ <label><?php _e( 'Google API Key', 'accesspress-social-counter' ); ?></label>
240
+ <div class="apsc-option-field">
241
+ <input type="text" name="social_profile[googlePlus][api_key]" value="<?php echo esc_attr( $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'api_key' ] ); ?>"/>
242
+ <div class="apsc-option-note">
243
+ <p><?php _e( 'To get your API Key, please go to <a href="https://console.developers.google.com/project" target="_blank">https://console.developers.google.com/project</a> and follow below steps.', 'accesspress-social-counter' ); ?></p>
244
+ <ol>
245
+ <li> <?php _e( 'Click on create project.', 'accesspress-social-counter' ); ?></li>
246
+ <li> <?php _e( 'Enter project name and click create, A new page will load with newly created app dashboard.', 'accesspress-social-counter' ); ?></li>
247
+ <li> <?php _e( 'In the blue API box click on "Enable and manage APIs".', 'accesspress-social-counter' ); ?></li>
248
+ <li> <?php _e( 'Enable google+ api by clicking on it.', 'accesspress-social-counter' ); ?></li>
249
+ <li> <?php _e( 'Now click on credentials tab.', 'accesspress-social-counter' ); ?></li>
250
+ <li> <?php _e( 'When you click on "Create Credentials" button, options will appear.', 'accesspress-social-counter' ); ?></li>
251
+ <li> <?php _e( 'Now click on API key, a popup will appear.', 'accesspress-social-counter' ); ?></li>
252
+ <li> <?php _e( 'Now click on Browser key.', 'accesspress-social-counter' ); ?></li>
253
+ <li> <?php _e( 'Copy the browser key and paste in the above field.', 'accesspress-social-counter' ); ?></li>
254
+ </ol>
255
+ <p class="description">
256
+ <?php _e( 'If still, the count is not displaying then there may be a privacy issue within the google+ account.You may need to public some of your settings in it.Please chek in the below screenshot:', 'accesspress-social-counter' ); ?>
257
+ </p>
258
+ <a href="https://i.imgur.com/4zbtqKH.png" target="_blank">https://i.imgur.com/4zbtqKH.png</a>
259
+ </div>
260
+ </div>
261
+ </div>
262
+ <div class="apsc-option-inner-wrapper apsc-row-even">
263
+ <label><?php _e( 'Default Count', 'ap-social-pro' ); ?></label>
264
+ <div class="apsc-option-field">
265
+ <input type="text" name="social_profile[googlePlus][default_count]" value="<?php echo isset( $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'default_count' ] ) && $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'default_count' ] != '' ? $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'default_count' ] : ''; ?>"/>
266
+ <div class="apsc-option-note"><?php _e( 'Please enter the default count to show instead of 0 when API\'s are not available.', 'ap-social-pro' ); ?></div>
267
+ </div>
268
+ </div>
269
+ </div>
270
+ <div class="apsc-extra-note"><?php _e( 'Please use: [aps-get-count social_media="googlePlus"] to get the Google Plus Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.' ); ?></div>
271
+ </div>
272
+ <!--Google Plus-->
273
+
274
+ <!--Instagram-->
275
+ <div class="apsc-option-outer-wrapper">
276
+ <h4><?php _e( 'Instagram', 'accesspress-social-counter' ) ?></h4>
277
+ <div class="apsc-option-inner-wrapper">
278
+ <label><?php _e( 'Display Counter', 'accesspress-social-counter' ) ?></label>
279
+ <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[instagram][active]" value="1" class="apsc-counter-activation-trigger" <?php if ( isset( $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'active' ] ) ) { ?>checked="checked"<?php } ?>/><?php _e( 'Show/Hide', 'accesspress-social-counter' ); ?></label></div>
280
+ </div>
281
+ <div class="apsc-option-extra">
282
+ <div class="apsc-option-inner-wrapper">
283
+ <label><?php _e( 'Instagram Username', 'accesspress-social-counter' ); ?></label>
284
+ <div class="apsc-option-field">
285
+ <input type="text" name="social_profile[instagram][username]" value="<?php echo esc_attr( $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'username' ] ); ?>"/>
286
+ <div class="apsc-option-note"><?php _e( 'Please enter the instagram username', 'accesspress-social-counter' ); ?></div>
287
+ </div>
288
+ </div>
289
+ <div class="apsc-option-inner-wrapper">
290
+ <label><?php _e( 'Instagram User ID', 'accesspress-social-counter' ); ?></label>
291
+ <div class="apsc-option-field">
292
+ <input type="text" name="social_profile[instagram][user_id]" value="<?php echo esc_attr( $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'user_id' ] ); ?>"/>
293
+ <div class="apsc-option-note"><?php _e( 'Please enter the instagram user ID.You can get this information from <a href="http://instagram.pixelunion.net/" target="_blank">http://www.pinceladasdaweb.com.br/instagram/access-token/</a>', 'accesspress-social-counter' ); ?></div>
294
+ </div>
295
+ </div>
296
+ <div class="apsc-option-inner-wrapper">
297
+ <label><?php _e( 'Instagram Access Token', 'accesspress-social-counter' ); ?></label>
298
+ <div class="apsc-option-field">
299
+ <input type="text" name="social_profile[instagram][access_token]" value="<?php echo esc_attr( $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'access_token' ] ); ?>"/>
300
+ <div class="apsc-option-note"><?php _e( 'Please enter the instagram Access Token.You can get this information from <a href="http://instagram.pixelunion.net/" target="_blank">http://instagram.pixelunion.net/</a>', 'accesspress-social-counter' ); ?></div>
301
+ </div>
302
+ </div>
303
+ <div class="apsc-option-inner-wrapper apsc-row-odd">
304
+ <label><?php _e( 'Default Count', 'ap-social-pro' ); ?></label>
305
+ <div class="apsc-option-field">
306
+ <input type="text" name="social_profile[instagram][default_count]" value="<?php echo isset( $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'default_count' ] ) && $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'default_count' ] != '' ? $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'default_count' ] : ''; ?>"/>
307
+ <div class="apsc-option-note"><?php _e( 'Please enter the default count to show instead of 0 when API\'s are not available.', 'ap-social-pro' ); ?></div>
308
+ </div>
309
+ </div>
310
+ </div>
311
+ <div class="apsc-extra-note"><?php _e( 'Please use: [aps-get-count social_media="instagram"] to get the Instagram Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.' ); ?></div>
312
+ </div>
313
+ <!--Instagram-->
314
+
315
+ <!--Youtube-->
316
+ <div class="apsc-option-outer-wrapper">
317
+ <h4><?php _e( 'Youtube', 'accesspress-social-counter' ) ?></h4>
318
+ <div class="apsc-option-inner-wrapper">
319
+ <label><?php _e( 'Display Counter', 'accesspress-social-counter' ) ?></label>
320
+ <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[youtube][active]" value="1" class="apsc-counter-activation-trigger" <?php if ( isset( $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'active' ] ) ) { ?>checked="checked"<?php } ?>/><?php _e( 'Show/Hide', 'accesspress-social-counter' ); ?></label></div>
321
+ </div>
322
+ <div class="apsc-option-extra">
323
+ <div class="apsc-option-inner-wrapper">
324
+ <label><?php _e( 'Youtube Channel ID', 'accesspress-social-counter' ); ?></label>
325
+ <div class="apsc-option-field">
326
+ <input type="text" name="social_profile[youtube][channel_id]" value="<?php echo isset( $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'channel_id' ] ) ? esc_attr( $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'channel_id' ] ) : ''; ?>"/>
327
+ <div class="apsc-option-note"><?php _e( 'Please enter the youtube channel ID.Your channel ID looks like: UC4WMyzBds5sSZcQxyAhxJ8g. And please note that your channel ID is different from username.Please go <a href="https://support.google.com/youtube/answer/3250431?hl=en" target="_blank">here</a> to know how to get your channel ID.', 'accesspress-social-counter' ); ?></div>
328
+ </div>
329
+ </div>
330
+ <div class="apsc-option-inner-wrapper">
331
+ <label><?php _e( 'Youtube Channel URL', 'accesspress-social-counter' ); ?></label>
332
+ <div class="apsc-option-field">
333
+ <input type="text" name="social_profile[youtube][channel_url]" value="<?php echo esc_attr( $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'channel_url' ] ); ?>"/>
334
+ <div class="apsc-option-note"><?php _e( 'Please enter the youtube channel URL.For example:https://www.youtube.com/user/accesspressthemes', 'accesspress-social-counter' ); ?></div>
335
+ </div>
336
+ </div>
337
+ <div class="apsc-option-inner-wrapper">
338
+ <label><?php _e( 'Youtube API Key', 'accesspress-social-counter' ); ?></label>
339
+ <div class="apsc-option-field">
340
+ <input type="text" name="social_profile[youtube][api_key]" value="<?php echo isset( $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'api_key' ] ) ? esc_attr( $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'api_key' ] ) : ''; ?>"/>
341
+ <div class="apsc-option-note"><?php _e( 'To get your API Key, first create a project/app in <a href="https://console.developers.google.com/project" target="_blank">https://console.developers.google.com/project</a> and then turn on both Youtube Data and Analytics API from "APIs & auth >APIs inside your project.Then again go to "APIs & auth > APIs > Credentials > Public API access" and then click "CREATE A NEW KEY" button, select the "Browser key" option and click in the "CREATE" button, and then copy your API key and paste in above field.', 'accesspress-social-counter' ); ?></div>
342
+ </div>
343
+ </div>
344
+ <div class="apsc-option-inner-wrapper">
345
+ <label><?php _e( 'Default Subscribers Count', 'accesspress-social-counter' ); ?></label>
346
+ <div class="apsc-option-field">
347
+ <input type="text" name="social_profile[youtube][subscribers_count]" value="<?php echo isset( $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'subscribers_count' ] ) ? esc_attr( $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'subscribers_count' ] ) : 0; ?>"/>
348
+ <div class="apsc-option-note"><?php _e( 'Please enter total number of subscribers that your youtube channel has in case the API fetching is failed for automatic update.', 'accesspress-social-counter' ); ?></div>
349
+ </div>
350
+ </div>
351
+ </div>
352
+ <div class="apsc-extra-note"><?php _e( 'Please use: [aps-get-count social_media="youtube"] to get the Youtube Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.' ); ?></div>
353
+ </div>
354
+ <!--Youtube-->
355
+
356
+ <!--Sound Cloud-->
357
+ <div class="apsc-option-outer-wrapper">
358
+ <h4><?php _e( 'Sound Cloud', 'accesspress-social-counter' ) ?></h4>
359
+ <div class="apsc-option-inner-wrapper">
360
+ <label><?php _e( 'Display Counter', 'accesspress-social-counter' ) ?></label>
361
+ <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[soundcloud][active]" value="1" class="apsc-counter-activation-trigger" <?php if ( isset( $apsc_settings[ 'social_profile' ][ 'soundcloud' ][ 'active' ] ) ) { ?>checked="checked"<?php } ?>/><?php _e( 'Show/Hide', 'accesspress-social-counter' ); ?></label></div>
362
+ </div>
363
+ <div class="apsc-option-extra">
364
+ <div class="apsc-option-inner-wrapper">
365
+ <label><?php _e( 'SoundCloud Username', 'accesspress-social-counter' ); ?></label>
366
+ <div class="apsc-option-field">
367
+ <input type="text" name="social_profile[soundcloud][username]" value="<?php echo $apsc_settings[ 'social_profile' ][ 'soundcloud' ][ 'username' ]; ?>"/>
368
+ <div class="apsc-option-note"><?php _e( 'Please enter the SoundCloud username.For example:bchettri', 'accesspress-social-counter' ); ?></div>
369
+ </div>
370
+ </div>
371
+ <div class="apsc-option-inner-wrapper">
372
+ <label><?php _e( 'SoundCloud Client ID', 'accesspress-social-counter' ); ?></label>
373
+ <div class="apsc-option-field">
374
+ <input type="text" name="social_profile[soundcloud][client_id]" value="<?php echo esc_attr( $apsc_settings[ 'social_profile' ][ 'soundcloud' ][ 'client_id' ] ); ?>"/>
375
+ <div class="apsc-option-note"><?php _e( 'Please enter the SoundCloud APP Client ID.You can get this information from <a href="http://soundcloud.com/you/apps/new">http://soundcloud.com/you/apps/new</a> after creating a new app', 'accesspress-social-counter' ); ?></div>
376
+ </div>
377
+ </div>
378
+ <div class="apsc-option-inner-wrapper apsc-row-even">
379
+ <label><?php _e( 'Default Count', 'ap-social-pro' ); ?></label>
380
+ <div class="apsc-option-field">
381
+ <input type="text" name="social_profile[soundcloud][default_count]" value="<?php echo isset( $apsc_settings[ 'social_profile' ][ 'soundcloud' ][ 'default_count' ] ) && $apsc_settings[ 'social_profile' ][ 'soundcloud' ][ 'default_count' ] != '' ? $apsc_settings[ 'social_profile' ][ 'soundcloud' ][ 'default_count' ] : ''; ?>"/>
382
+ <div class="apsc-option-note"><?php _e( 'Please enter the default count to show instead of 0 when API\'s are not available.', 'ap-social-pro' ); ?></div>
383
+ </div>
384
+ </div>
385
+ </div>
386
+ <div class="apsc-extra-note"><?php _e( 'Please use: [aps-get-count social_media="soundcloud"] to get the SoundCloud Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.' ); ?></div>
387
+ </div>
388
+ <!--Sound Cloud-->
389
+
390
+ <!--Dribbble-->
391
+ <div class="apsc-option-outer-wrapper">
392
+ <h4><?php _e( 'Dribbble', 'accesspress-social-counter' ) ?></h4>
393
+ <div class="apsc-option-inner-wrapper">
394
+ <label><?php _e( 'Display Counter', 'accesspress-social-counter' ) ?></label>
395
+ <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[dribbble][active]" value="1" class="apsc-counter-activation-trigger" <?php if ( isset( $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'active' ] ) ) { ?>checked="checked"<?php } ?>/><?php _e( 'Show/Hide', 'accesspress-social-counter' ); ?></label></div>
396
+ </div>
397
+ <div class="apsc-option-extra">
398
+ <div class="apsc-option-inner-wrapper">
399
+ <label><?php _e( 'Dribbble Username', 'accesspress-social-counter' ); ?></label>
400
+ <div class="apsc-option-field">
401
+ <input type="text" name="social_profile[dribbble][username]" value="<?php echo esc_attr( $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'username' ] ); ?>"/>
402
+ <div class="apsc-option-note"><?php _e( 'Please enter your dribbble username.For example:Creativedash', 'accesspress-social-counter' ); ?></div>
403
+ </div>
404
+ </div>
405
+ </div>
406
+ <div class="apsc-option-inner-wrapper apsc-row-odd">
407
+ <label><?php _e( 'Access Token', 'ap-social-pro' ); ?></label>
408
  <div class="apsc-option-field">
409
+ <input type="text" name="social_profile[dribbble][access_token]" value="<?php
410
+ if ( isset( $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'access_token' ] ) ) {
411
+ echo $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'access_token' ];
412
+ }
413
+ ?>"/>
414
+ <div class="apsc-option-note"><?php _e( 'Please enter access token from your dribbble app.', 'ap-social-pro' ); ?></div>
415
+ <div class="apsc-option-note">
416
+ How to get access token? <br />
417
+ please login to your dribbble account first and go to <a href='https://dribbble.com/account/applications/new' target='_blank'>this</a> link and create an app. There you will need to enter your app name, Description, Website URL, Callback URL and need to accept the dribbble API terms and conditions and Click on Register Application button. Upon Registration after page reload you will get your client access token. This is the required access token.
418
+ </div>
419
+ </div>
420
+ </div>
421
+ <div class="apsc-option-inner-wrapper apsc-row-even">
422
+ <label><?php _e( 'Default Count', 'ap-social-pro' ); ?></label>
 
 
 
 
 
423
  <div class="apsc-option-field">
424
+ <input type="text" name="social_profile[dribbble][default_count]" value="<?php echo isset( $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'default_count' ] ) && $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'default_count' ] != '' ? $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'default_count' ] : ''; ?>"/>
425
+ <div class="apsc-option-note"><?php _e( 'Please enter the default count to show instead of 0 when API\'s are not available.', 'ap-social-pro' ); ?></div>
426
+ </div>
427
+ </div>
428
+ <div class="apsc-extra-note"><?php _e( 'Please use: [aps-get-count social_media="dribbble"] to get the Dribbble Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.' ); ?></div>
429
+ </div>
430
+ <!--Dribbble-->
431
+
432
+ <!--Posts-->
433
+ <div class="apsc-option-outer-wrapper">
434
+ <h4><?php _e( "Posts", 'accesspress-social-counter' ) ?></h4>
435
+ <div class="apsc-option-inner-wrapper">
436
+ <label><?php _e( 'Display Counter', 'accesspress-social-counter' ); ?></label>
437
+ <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[posts][active]" value="1" class="apsc-counter-activation-trigger" <?php if ( isset( $apsc_settings[ 'social_profile' ][ 'posts' ][ 'active' ] ) ) { ?>checked="checked"<?php } ?>/><?php _e( 'Show/Hide', 'accesspress-social-counter' ); ?></label></div>
438
+ </div>
439
+ <div class="apsc-extra-note"><?php _e( 'Please use: [aps-get-count social_media="posts"] to get the Posts Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.' ); ?></div>
440
+ </div>
441
+ <!--Posts-->
442
+
443
+ <!--Comments-->
444
+ <div class="apsc-option-outer-wrapper">
445
+ <h4><?php _e( "Comments", 'accesspress-social-counter' ); ?></h4>
446
+ <div class="apsc-option-inner-wrapper">
447
+ <label><?php _e( 'Display Counter', 'accesspress-social-counter' ); ?></label>
448
+ <div class="apsc-option-field"><label><input type="checkbox" name="social_profile[comments][active]" value="1" class="apsc-counter-activation-trigger" <?php if ( isset( $apsc_settings[ 'social_profile' ][ 'comments' ][ 'active' ] ) ) { ?>checked="checked"<?php } ?>/><?php _e( 'Show/Hide', 'accesspress-social-counter' ); ?></label></div>
449
+ </div>
450
+ <div class="apsc-extra-note"><?php _e( 'Please use: [aps-get-count social_media="comments"] to get the Comments Count only.You can also pass count_format parameter too in this shortcode to format your count.Formats are "short" for abbreviated format and "comma" for comma separated formats.' ); ?></div>
451
+ </div>
452
+ <!--Comments-->
453
+
454
+ </div>
 
455
 
456
  </div>
inc/frontend/api.php CHANGED
@@ -1,219 +1,36 @@
1
- <?php
2
- $count = 0;
3
- $apsc_settings = $this->apsc_settings;
4
- $cache_period = ($apsc_settings['cache_period'] != '') ? $apsc_settings['cache_period']*60*60 : 24 * 60 * 60;
5
- switch($social_media){
6
- case 'facebook':
7
- $facebook_page_id = $apsc_settings['social_profile']['facebook']['page_id'];
8
- $facebook_count = get_transient('apsc_facebook');
9
- if (false === $facebook_count) {
10
- if(isset($apsc_settings['social_profile']['facebook']['app_id'],$apsc_settings['social_profile']['facebook']['app_secret']) && $apsc_settings['social_profile']['facebook']['app_id']!='' && $apsc_settings['social_profile']['facebook']['app_secret']!=''){
11
- $count = $this->new_fb_count();
12
-
13
-
14
- }else{
15
- $api_url = 'https://www.facebook.com/' . $facebook_page_id;
16
-
17
- $count = $this->facebook_count($api_url);
18
-
19
- }
20
-
21
- set_transient('apsc_facebook', $count, $cache_period);
22
-
23
- } else {
24
- $count = $facebook_count;
25
- }
26
-
27
- $default_count = isset($apsc_settings['social_profile']['facebook']['default_count'])?$apsc_settings['social_profile']['facebook']['default_count']:0;
28
- $count = ($count==0)?$default_count:$count;
29
- if($count!=0){
30
- set_transient('apsc_facebook',$count,$cache_period);
31
- }
32
- break;
33
- case 'twitter':
34
-
35
- $twitter_count = get_transient('apsc_twitter');
36
- if (false === $twitter_count) {
37
- $count = ($this->get_twitter_count());
38
- set_transient('apsc_twitter', $count, $cache_period);
39
- } else {
40
- $count = $twitter_count;
41
- }
42
-
43
-
44
- break;
45
- case 'googlePlus':
46
- $social_profile_url = 'https://plus.google.com/' . $apsc_settings['social_profile']['googlePlus']['page_id'];
47
-
48
- $googlePlus_count = get_transient('apsc_googlePlus');
49
- if (false === $googlePlus_count) {
50
- $api_url = 'https://www.googleapis.com/plus/v1/people/' . $apsc_settings['social_profile']['googlePlus']['page_id'] . '?key=' . $apsc_settings['social_profile']['googlePlus']['api_key'];
51
- $params = array(
52
- 'sslverify' => false,
53
- 'timeout' => 60
54
- );
55
- $connection = wp_remote_get($api_url, $params);
56
-
57
- if (is_wp_error($connection)) {
58
- $count = 0;
59
- } else {
60
- $_data = json_decode($connection['body'], true);
61
-
62
- if (isset($_data['circledByCount'])) {
63
- $count = (intval($_data['circledByCount']));
64
- set_transient('apsc_googlePlus', $count,$cache_period);
65
- } else {
66
- $count = 0;
67
- }
68
- }
69
- } else {
70
- $count = $googlePlus_count;
71
- }
72
-
73
- break;
74
- case 'instagram':
75
- $username = $apsc_settings['social_profile']['instagram']['username'];
76
- $user_id = $apsc_settings['social_profile']['instagram']['user_id'];
77
- $social_profile_url = 'https://instagram.com/' . $username;
78
-
79
- $instagram_count = get_transient('apsc_instagram');
80
- if (false === $instagram_count) {
81
- $access_token = $apsc_settings['social_profile']['instagram']['access_token'];
82
 
83
- $api_url = 'https://api.instagram.com/v1/users/self/?access_token=' . $access_token;
84
- $params = array(
85
- 'sslverify' => false,
86
- 'timeout' => 60
87
- );
88
- $connection = wp_remote_get($api_url, $params);
89
- if (is_wp_error($connection)) {
90
- $count = 0;
91
- } else {
92
- $response = json_decode($connection['body'], true);
93
- if (
94
- isset($response['meta']['code']) && 200 == $response['meta']['code'] && isset($response['data']['counts']['followed_by'])
95
- ) {
96
- $count = (intval($response['data']['counts']['followed_by']));
97
- set_transient('apsc_instagram',$count,$cache_period);
98
- } else {
99
- $count = 0;
100
- }
101
- }
102
- } else {
103
- $count = $instagram_count;
104
- }
105
-
106
- break;
107
- case 'youtube':
108
- $social_profile_url = esc_url($apsc_settings['social_profile']['youtube']['channel_url']);
109
- $count = get_transient('apsc_youtube');
110
-
111
- if(false === $count){
112
- $count = $apsc_settings['social_profile']['youtube']['subscribers_count'];
113
- if(
114
- isset($apsc_settings['social_profile']['youtube']['channel_id'],$apsc_settings['social_profile']['youtube']['api_key']) &&
115
- $apsc_settings['social_profile']['youtube']['channel_id']!='' && $apsc_settings['social_profile']['youtube']['api_key']
116
- )
117
- {
118
-
119
- $api_key = $apsc_settings['social_profile']['youtube']['api_key'];
120
- $channel_id = $apsc_settings['social_profile']['youtube']['channel_id'];
121
- $api_url = 'https://www.googleapis.com/youtube/v3/channels?part=statistics&id='.$channel_id.'&key='.$api_key;
122
- $connection = wp_remote_get($api_url, array('timeout'=>60));
123
-
124
- if (!is_wp_error($connection)) {
125
- $response = json_decode($connection['body'], true);
126
- if (isset($response['items'][0]['statistics']['subscriberCount'])) {
127
- $count = $response['items'][0]['statistics']['subscriberCount'];
128
- set_transient('apsc_youtube',$count,$cache_period);
129
- }
130
- }
131
- }
132
- }
133
- break;
134
- case 'soundcloud':
135
- $username = $apsc_settings['social_profile']['soundcloud']['username'];
136
- $social_profile_url = 'https://soundcloud.com/' . $username;
137
-
138
- $soundcloud_count = get_transient('apsc_soundcloud');
139
- if (false === $soundcloud_count) {
140
- $api_url = 'https://api.soundcloud.com/users/' . $username . '.json?client_id=' . $apsc_settings['social_profile']['soundcloud']['client_id'];
141
- $params = array(
142
- 'sslverify' => false,
143
- 'timeout' => 60
144
- );
145
-
146
- $connection = wp_remote_get($api_url, $params);
147
- if (is_wp_error($connection)) {
148
- $count = 0;
149
- } else {
150
- $response = json_decode($connection['body'], true);
151
-
152
- if (isset($response['followers_count'])) {
153
- $count = (intval($response['followers_count']));
154
- set_transient( 'apsc_soundcloud',$count,$cache_period );
155
- } else {
156
- $count = 0;
157
- }
158
- }
159
- } else {
160
- $count = $soundcloud_count;
161
- }
162
-
163
- break;
164
- case 'dribbble':
165
- $social_profile_url = 'http://dribbble.com/'.$apsc_settings['social_profile']['dribbble']['username'];
166
-
167
- $dribbble_count = get_transient('apsc_dribbble');
168
- if (false === $dribbble_count) {
169
- $username = $apsc_settings['social_profile']['dribbble']['username'];
170
- $api_url = 'http://api.dribbble.com/' . $username;
171
- $params = array(
172
- 'sslverify' => false,
173
- 'timeout' => 60
174
- );
175
- $connection = wp_remote_get($api_url, $params);
176
- if (is_wp_error($connection)) {
177
- $count = 0;
178
- } else {
179
- $response = json_decode($connection['body'], true);
180
- if (isset($response['followers_count'])) {
181
- $count = (intval($response['followers_count']));
182
- set_transient('apsc_dribbble',$count,$cache_period );
183
- } else {
184
- $count = 0;
185
- }
186
- }
187
- } else {
188
- $count = $dribbble_count;
189
- }
190
-
191
- break;
192
- case 'posts':
193
-
194
- $posts_count = get_transient('apsc_posts');
195
- if (false === $posts_count) {
196
- $posts_count = wp_count_posts();
197
- $count = $posts_count->publish;
198
- set_transient('apsc_posts', $count, $cache_period);
199
- } else {
200
- $count = $posts_count;
201
- }
202
-
203
- break;
204
- case 'comments':
205
-
206
- $comments_count = get_transient('apsc_comments');
207
- if (false === $comments_count) {
208
- $data = wp_count_comments();
209
- $count = ($data->approved);
210
- set_transient('apsc_comments', $count, $cache_period);
211
- } else {
212
- $count = $comments_count;
213
- }
214
-
215
- break;
216
- default:
217
- break;
218
- }
219
-
1
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ $count = 0;
4
+ $apsc_settings = $this -> apsc_settings;
5
+ $cache_period = ($apsc_settings[ 'cache_period' ] != '') ? esc_attr( $apsc_settings[ 'cache_period' ] ) * 60 * 60 : 24 * 60 * 60;
6
+ switch ( $social_media ) {
7
+ case 'facebook':
8
+ include(SC_PATH . 'inc/frontend/social_network/facebook.php');
9
+ break;
10
+ case 'twitter':
11
+ include(SC_PATH . 'inc/frontend/social_network/twitter.php');
12
+ break;
13
+ case 'googlePlus':
14
+ include(SC_PATH . 'inc/frontend/social_network/googlePlus.php');
15
+ break;
16
+ case 'instagram':
17
+ include(SC_PATH . 'inc/frontend/social_network/instagram.php');
18
+ break;
19
+ case 'youtube':
20
+ include(SC_PATH . 'inc/frontend/social_network/youtube.php');
21
+ break;
22
+ case 'soundcloud':
23
+ include(SC_PATH . 'inc/frontend/social_network/soundcloud.php');
24
+ break;
25
+ case 'dribbble':
26
+ include(SC_PATH . 'inc/frontend/social_network/dribbble.php');
27
+ break;
28
+ case 'posts':
29
+ include(SC_PATH . 'inc/frontend/social_network/posts.php');
30
+ break;
31
+ case 'comments':
32
+ include(SC_PATH . 'inc/frontend/social_network/comments.php');
33
+ break;
34
+ default:
35
+ break;
36
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/frontend/shortcode.php CHANGED
@@ -1,128 +1,128 @@
1
  <?php
2
- defined('ABSPATH') or die("No script kiddies please!");
3
 
4
- $apsc_settings = $this->apsc_settings;
5
- $cache_period = ($apsc_settings['cache_period'] != '') ? $apsc_settings['cache_period']*60*60 : 24 * 60 * 60;
6
 
7
- $apsc_settings['social_profile_theme'] = isset($atts['theme'])?$atts['theme']:$apsc_settings['social_profile_theme'];
8
- $format = isset($apsc_settings['counter_format'])?$apsc_settings['counter_format']:'comma';
9
  ?>
10
- <div class="apsc-icons-wrapper clearfix apsc-<?php echo $apsc_settings['social_profile_theme']; ?>" >
11
- <?php
12
- foreach ($apsc_settings['profile_order'] as $social_profile) {
13
- if (isset($apsc_settings['social_profile'][$social_profile]['active']) && $apsc_settings['social_profile'][$social_profile]['active'] == 1) {
14
- ?>
15
- <div class="apsc-each-profile">
16
- <?php
17
- $count = $this->get_count($social_profile);
18
- $count = ($count!=0)?$this->get_formatted_count($count,$format):$count;
19
- switch ($social_profile) {
20
- case 'facebook':
21
- $facebook_page_id = $apsc_settings['social_profile']['facebook']['page_id'];
22
- ?>
23
- <a class="apsc-facebook-icon clearfix" href="<?php echo "https://facebook.com/" . $facebook_page_id; ?>" target="_blank" <?php do_action('apsc_facebook_link');?>>
24
- <div class="apsc-inner-block">
25
- <span class="social-icon"><i class="fa fa-facebook apsc-facebook"></i><span class="media-name">Facebook</span></span>
26
- <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Fans</span>
27
- </div>
28
- </a>
29
- <?php
30
- break;
31
- case 'twitter':
32
- ?>
33
- <a class="apsc-twitter-icon clearfix" href="<?php echo 'https://twitter.com/'.$apsc_settings['social_profile']['twitter']['username'];?>" target="_blank" <?php do_action('apsc_twitter_link');?>>
34
- <div class="apsc-inner-block">
35
- <span class="social-icon"><i class="fa fa-twitter apsc-twitter"></i><span class="media-name">Twitter</span></span>
36
- <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
37
- </div>
38
- </a>
39
  <?php
40
- break;
41
- case 'googlePlus':
42
- $social_profile_url = 'https://plus.google.com/' . $apsc_settings['social_profile']['googlePlus']['page_id'];
43
- ?>
44
- <a class="apsc-google-plus-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank" <?php do_action('apsc_googlePlus_link');?>>
45
- <div class="apsc-inner-block">
46
- <span class="social-icon"><i class="apsc-googlePlus fa fa-google-plus"></i><span class="media-name">google+</span></span>
47
- <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
48
- </div>
49
- </a>
50
- <?php
51
- break;
52
- case 'instagram':
53
- $username = $apsc_settings['social_profile']['instagram']['username'];
54
- $user_id = $apsc_settings['social_profile']['instagram']['user_id'];
55
- $social_profile_url = 'https://instagram.com/' . $username;
56
- ?>
57
- <a class="apsc-instagram-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank" <?php do_action('apsc_instagram_link');?>>
58
- <div class="apsc-inner-block">
59
- <span class="social-icon"><i class="apsc-instagram fa fa-instagram"></i><span class="media-name">Instagram</span></span>
60
- <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
61
- </div>
62
- </a>
63
- <?php
64
- break;
65
- case 'youtube':
66
- $social_profile_url = esc_url($apsc_settings['social_profile']['youtube']['channel_url']);
67
- ?>
68
- <a class="apsc-youtube-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank" <?php do_action('apsc_youtube_link');?>>
69
- <div class="apsc-inner-block">
70
- <span class="social-icon"><i class="apsc-youtube fa fa-youtube"></i><span class="media-name">Youtube</span></span>
71
- <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Subscriber</span>
72
- </div>
73
- </a>
74
- <?php
75
- break;
76
- case 'soundcloud':
77
- $username = $apsc_settings['social_profile']['soundcloud']['username'];
78
- $social_profile_url = 'https://soundcloud.com/' . $username;
79
- ?>
80
- <a class="apsc-soundcloud-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank" <?php do_action('apsc_soundcloud_link');?>>
81
- <div class="apsc-inner-block">
82
- <span class="social-icon"><i class="apsc-soundcloud fa fa-soundcloud"></i><span class="media-name">Soundcloud</span></span>
83
- <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
84
- </div>
85
- </a>
86
- <?php
87
- break;
88
- case 'dribbble':
89
- $social_profile_url = 'https://dribbble.com/'.$apsc_settings['social_profile']['dribbble']['username'];
90
- ?>
91
- <a class="apsc-dribble-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank" <?php do_action('apsc_dribbble_link');?>>
92
- <div class="apsc-inner-block">
93
- <span class="social-icon"><i class="apsc-dribbble fa fa-dribbble"></i><span class="media-name">dribble</span></span>
94
- <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
95
- </div>
96
- </a>
97
- <?php
98
- break;
99
- case 'posts':
100
- ?>
101
- <a class="apsc-edit-icon clearfix" href="javascript:void(0);" <?php do_action('apsc_posts_link');?>>
102
- <div class="apsc-inner-block">
103
- <span class="social-icon"><i class="apsc-posts fa fa-edit"></i><span class="media-name">Post</span></span>
104
- <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Post</span>
105
- </div>
106
- </a>
107
- <?php
108
- break;
109
- case 'comments':
110
- ?>
111
- <a class="apsc-comment-icon clearfix" href="javascript:void(0);" <?php do_action('apsc_comments_link');?>>
112
- <div class="apsc-inner-block">
113
- <span class="social-icon"><i class="apsc-comments fa fa-comments"></i><span class="media-name">Comment</span></span>
114
- <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Comments</span>
115
- </div>
116
- </a>
117
- <?php
118
- break;
119
- default:
120
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  }
122
  ?>
123
- </div><?php
124
- }
125
- }
126
- ?>
127
  </div>
128
 
1
  <?php
2
+ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
3
 
4
+ $apsc_settings = $this -> apsc_settings;
5
+ $cache_period = ($apsc_settings[ 'cache_period' ] != '') ? esc_attr( $apsc_settings[ 'cache_period' ] ) * 60 * 60 : 24 * 60 * 60;
6
 
7
+ $apsc_settings[ 'social_profile_theme' ] = isset( $atts[ 'theme' ] ) ? esc_attr( $atts[ 'theme' ] ) : esc_attr( $apsc_settings[ 'social_profile_theme' ] );
8
+ $format = isset( $apsc_settings[ 'counter_format' ] ) ? esc_attr( $apsc_settings[ 'counter_format' ] ) : 'comma';
9
  ?>
10
+ <div class="apsc-icons-wrapper clearfix apsc-<?php echo $apsc_settings[ 'social_profile_theme' ]; ?>" >
11
+ <?php
12
+ foreach ( $apsc_settings[ 'profile_order' ] as $social_profile ) {
13
+ if ( isset( $apsc_settings[ 'social_profile' ][ $social_profile ][ 'active' ] ) && $apsc_settings[ 'social_profile' ][ $social_profile ][ 'active' ] == 1 ) {
14
+ ?>
15
+ <div class="apsc-each-profile">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  <?php
17
+ $count = $this -> get_count( $social_profile );
18
+ $count = ($count != 0) ? $this -> get_formatted_count( $count, $format ) : $count;
19
+ switch ( $social_profile ) {
20
+ case 'facebook':
21
+ $facebook_page_id = $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'page_id' ];
22
+ ?>
23
+ <a class="apsc-facebook-icon clearfix" href="<?php echo "https://facebook.com/" . $facebook_page_id; ?>" target="_blank" <?php do_action( 'apsc_facebook_link' ); ?>>
24
+ <div class="apsc-inner-block">
25
+ <span class="social-icon"><i class="fa fa-facebook apsc-facebook"></i><span class="media-name">Facebook</span></span>
26
+ <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Fans</span>
27
+ </div>
28
+ </a>
29
+ <?php
30
+ break;
31
+ case 'twitter':
32
+ ?>
33
+ <a class="apsc-twitter-icon clearfix" href="<?php echo 'https://twitter.com/' . $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'username' ]; ?>" target="_blank" <?php do_action( 'apsc_twitter_link' ); ?>>
34
+ <div class="apsc-inner-block">
35
+ <span class="social-icon"><i class="fa fa-twitter apsc-twitter"></i><span class="media-name">Twitter</span></span>
36
+ <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
37
+ </div>
38
+ </a>
39
+ <?php
40
+ break;
41
+ case 'googlePlus':
42
+ $social_profile_url = 'https://plus.google.com/' . $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'page_id' ];
43
+ ?>
44
+ <a class="apsc-google-plus-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank" <?php do_action( 'apsc_googlePlus_link' ); ?>>
45
+ <div class="apsc-inner-block">
46
+ <span class="social-icon"><i class="apsc-googlePlus fa fa-google-plus"></i><span class="media-name">google+</span></span>
47
+ <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
48
+ </div>
49
+ </a>
50
+ <?php
51
+ break;
52
+ case 'instagram':
53
+ $username = $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'username' ];
54
+ $user_id = $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'user_id' ];
55
+ $social_profile_url = 'https://instagram.com/' . $username;
56
+ ?>
57
+ <a class="apsc-instagram-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank" <?php do_action( 'apsc_instagram_link' ); ?>>
58
+ <div class="apsc-inner-block">
59
+ <span class="social-icon"><i class="apsc-instagram fa fa-instagram"></i><span class="media-name">Instagram</span></span>
60
+ <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
61
+ </div>
62
+ </a>
63
+ <?php
64
+ break;
65
+ case 'youtube':
66
+ $social_profile_url = esc_url( $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'channel_url' ] );
67
+ ?>
68
+ <a class="apsc-youtube-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank" <?php do_action( 'apsc_youtube_link' ); ?>>
69
+ <div class="apsc-inner-block">
70
+ <span class="social-icon"><i class="apsc-youtube fa fa-youtube"></i><span class="media-name">Youtube</span></span>
71
+ <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Subscriber</span>
72
+ </div>
73
+ </a>
74
+ <?php
75
+ break;
76
+ case 'soundcloud':
77
+ $username = $apsc_settings[ 'social_profile' ][ 'soundcloud' ][ 'username' ];
78
+ $social_profile_url = 'https://soundcloud.com/' . $username;
79
+ ?>
80
+ <a class="apsc-soundcloud-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank" <?php do_action( 'apsc_soundcloud_link' ); ?>>
81
+ <div class="apsc-inner-block">
82
+ <span class="social-icon"><i class="apsc-soundcloud fa fa-soundcloud"></i><span class="media-name">Soundcloud</span></span>
83
+ <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
84
+ </div>
85
+ </a>
86
+ <?php
87
+ break;
88
+ case 'dribbble':
89
+ $social_profile_url = 'https://dribbble.com/' . $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'username' ];
90
+ ?>
91
+ <a class="apsc-dribble-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank" <?php do_action( 'apsc_dribbble_link' ); ?>>
92
+ <div class="apsc-inner-block">
93
+ <span class="social-icon"><i class="apsc-dribbble fa fa-dribbble"></i><span class="media-name">dribble</span></span>
94
+ <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
95
+ </div>
96
+ </a>
97
+ <?php
98
+ break;
99
+ case 'posts':
100
+ ?>
101
+ <a class="apsc-edit-icon clearfix" href="javascript:void(0);" <?php do_action( 'apsc_posts_link' ); ?>>
102
+ <div class="apsc-inner-block">
103
+ <span class="social-icon"><i class="apsc-posts fa fa-edit"></i><span class="media-name">Post</span></span>
104
+ <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Post</span>
105
+ </div>
106
+ </a>
107
+ <?php
108
+ break;
109
+ case 'comments':
110
+ ?>
111
+ <a class="apsc-comment-icon clearfix" href="javascript:void(0);" <?php do_action( 'apsc_comments_link' ); ?>>
112
+ <div class="apsc-inner-block">
113
+ <span class="social-icon"><i class="apsc-comments fa fa-comments"></i><span class="media-name">Comment</span></span>
114
+ <span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Comments</span>
115
+ </div>
116
+ </a>
117
+ <?php
118
+ break;
119
+ default:
120
+ break;
121
  }
122
  ?>
123
+ </div><?php
124
+ }
125
+ }
126
+ ?>
127
  </div>
128
 
inc/frontend/social_network/comments.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $comments_count = get_transient( 'apsc_comments' );
4
+ if ( false === $comments_count ) {
5
+ $data = wp_count_comments();
6
+ $count = ($data -> approved);
7
+ set_transient( 'apsc_comments', $count, $cache_period );
8
+ } else {
9
+ $count = $comments_count;
10
+ }
inc/frontend/social_network/dribbble.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $social_profile_url = 'http://dribbble.com/' . $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'username' ];
4
+ $default_count = isset( $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'default_count' ] ) && $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'default_count' ] != '' ? $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'default_count' ] : '';
5
+
6
+ $dribbble_count = get_transient( 'apsc_dribbble' );
7
+
8
+ //$dribbble_count = false;
9
+
10
+ if ( false === $dribbble_count ) {
11
+ $username = (isset( $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'username' ] ) && $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'username' ] != '') ? $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'username' ] : '';
12
+ if ( isset( $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'access_token' ] ) && $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'access_token' ] != '' ) {
13
+ $access_token = $apsc_settings[ 'social_profile' ][ 'dribbble' ][ 'access_token' ];
14
+ //$api_url = 'https://api.dribbble.com/v1/users/' . $username.'/?access_token='.$access_token; This one is depricated (V1)
15
+ //die( 'reached' );
16
+ $api_url = 'https://api.dribbble.com/v2/user?access_token=' . $access_token;
17
+ } else {
18
+ $api_url = 'http://api.dribbble.com/' . $username;
19
+ }
20
+ $params = array(
21
+ 'sslverify' => false,
22
+ 'timeout' => 60
23
+ );
24
+ $connection = wp_remote_get( $api_url, $params );
25
+ if ( is_wp_error( $connection ) ) {
26
+ $count = $default_count;
27
+ } else {
28
+ $response = json_decode( $connection[ 'body' ], true );
29
+ if ( isset( $response[ 'followers_count' ] ) ) {
30
+ $count = intval( $response[ 'followers_count' ] );
31
+ } else {
32
+ $count = $default_count;
33
+ }
34
+ }
35
+ set_transient( 'apsc_dribbble', $count, $cache_period );
36
+ } else {
37
+ $count = $dribbble_count;
38
+ }
inc/frontend/social_network/facebook.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $facebook_page_id = isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'page_id' ] ) && $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'page_id' ] != '' ? $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'page_id' ] : '';
4
+ $default_count = isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'default_count' ] ) && $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'default_count' ] != '' ? $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'default_count' ] : '0';
5
+ $facebook_count = get_transient( 'apsc_facebook' );
6
+
7
+ if ( false === $facebook_count ) {
8
+ $facebook_method = ( isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] ) && $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] != '' ) ? esc_attr( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] ) : '2';
9
+ if ( $facebook_method == '1' ) {
10
+ $count = $this -> new_fb_count();
11
+ } else {
12
+ if ( isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_id' ], $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_secret' ] ) && $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_id' ] != '' && $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'app_secret' ] != '' ) {
13
+ $count = $this -> new_fb_count();
14
+ } else {
15
+ $api_url = 'https://www.facebook.com/' . $facebook_page_id;
16
+ $count = $this -> facebook_count( $api_url );
17
+ }
18
+ }
19
+ set_transient( 'apsc_facebook', $count, $cache_period );
20
+ } else {
21
+ $count = $facebook_count;
22
+ }
23
+
24
+ $count = ($count == 0) ? $default_count : $count;
25
+ if ( $count != 0 ) {
26
+ set_transient( 'apsc_facebook', $count, $cache_period );
27
+ }
inc/frontend/social_network/googlePlus.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $social_profile_url = 'https://plus.google.com/' . $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'page_id' ];
4
+ $default_count = isset( $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'default_count' ] ) && $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'default_count' ] != '' ? $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'default_count' ] : '0';
5
+
6
+ $googlePlus_count = get_transient( 'apsc_googlePlus' );
7
+ if ( false === $googlePlus_count ) {
8
+ $api_url = 'https://www.googleapis.com/plus/v1/people/' . $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'page_id' ] . '?key=' . $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'api_key' ];
9
+ $params = array(
10
+ 'sslverify' => false,
11
+ 'timeout' => 60
12
+ );
13
+ $connection = wp_remote_get( $api_url, $params );
14
+
15
+ if ( is_wp_error( $connection ) ) {
16
+ $count = $default_count;
17
+ } else {
18
+ $_data = json_decode( $connection[ 'body' ], true );
19
+
20
+ if ( isset( $_data[ 'circledByCount' ] ) ) {
21
+ $count = (intval( $_data[ 'circledByCount' ] ));
22
+ set_transient( 'apsc_googlePlus', $count, $cache_period );
23
+ } else {
24
+ $count = $default_count;
25
+ }
26
+ }
27
+ } else {
28
+ $count = $googlePlus_count;
29
+ }
inc/frontend/social_network/instagram.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $username = isset( $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'username' ] ) && $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'username' ] != '' ? $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'username' ] : '';
4
+ $user_id = isset( $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'user_id' ] ) && $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'user_id' ] != '' ? $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'user_id' ] : '';
5
+ $default_count = isset( $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'default_count' ] ) && $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'default_count' ] != '' ? $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'default_count' ] : '0';
6
+
7
+ $social_profile_url = 'https://instagram.com/' . $username;
8
+
9
+ $instagram_count = get_transient( 'apsc_instagram' );
10
+
11
+ if ( false === $instagram_count ) {
12
+ $access_token = $apsc_settings[ 'social_profile' ][ 'instagram' ][ 'access_token' ];
13
+
14
+ $api_url = 'https://api.instagram.com/v1/users/self/?access_token=' . $access_token;
15
+ $params = array(
16
+ 'sslverify' => false,
17
+ 'timeout' => 60
18
+ );
19
+ $connection = wp_remote_get( $api_url, $params );
20
+ if ( is_wp_error( $connection ) ) {
21
+ $count = $default_count;
22
+ } else {
23
+ $response = json_decode( $connection[ 'body' ], true );
24
+ if (
25
+ isset( $response[ 'meta' ][ 'code' ] ) && 200 == $response[ 'meta' ][ 'code' ] && isset( $response[ 'data' ][ 'counts' ][ 'followed_by' ] )
26
+ ) {
27
+ $count = (intval( $response[ 'data' ][ 'counts' ][ 'followed_by' ] ));
28
+ set_transient( 'apsc_instagram', $count, $cache_period );
29
+ } else {
30
+ $count = $default_count;
31
+ }
32
+ }
33
+ } else {
34
+ $count = $instagram_count;
35
+ }
36
+
inc/frontend/social_network/posts.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $posts_count = get_transient( 'apsc_posts' );
4
+ if ( false === $posts_count ) {
5
+ $posts_count = wp_count_posts();
6
+ $count = $posts_count -> publish;
7
+ set_transient( 'apsc_posts', $count, $cache_period );
8
+ } else {
9
+ $count = $posts_count;
10
+ }
11
+
inc/frontend/social_network/soundcloud.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $username = isset( $apsc_settings[ 'social_profile' ][ 'soundcloud' ][ 'username' ] ) && $apsc_settings[ 'social_profile' ][ 'soundcloud' ][ 'username' ] != '' ? $apsc_settings[ 'social_profile' ][ 'soundcloud' ][ 'username' ] : '';
4
+ $social_profile_url = 'https://soundcloud.com/' . $username;
5
+ $default_count = isset( $apsc_settings[ 'social_profile' ][ 'soundcloud' ][ 'default_count' ] ) && $apsc_settings[ 'social_profile' ][ 'soundcloud' ][ 'default_count' ] != '' ? $apsc_settings[ 'social_profile' ][ 'soundcloud' ][ 'default_count' ] : '';
6
+
7
+ $soundcloud_count = get_transient( 'apsc_soundcloud' );
8
+ if ( false === $soundcloud_count ) {
9
+ $api_url = 'https://api.soundcloud.com/users/' . $username . '.json?client_id=' . $apsc_settings[ 'social_profile' ][ 'soundcloud' ][ 'client_id' ];
10
+ $params = array(
11
+ 'sslverify' => false,
12
+ 'timeout' => 60
13
+ );
14
+
15
+ $connection = wp_remote_get( $api_url, $params );
16
+ if ( is_wp_error( $connection ) ) {
17
+ $count = $default_count;
18
+ } else {
19
+ $response = json_decode( $connection[ 'body' ], true );
20
+ if ( isset( $response[ 'followers_count' ] ) ) {
21
+ $count = (intval( $response[ 'followers_count' ] ));
22
+ set_transient( 'apsc_soundcloud', $count, $cache_period );
23
+ } else {
24
+ $count = $default_count;
25
+ }
26
+ }
27
+ } else {
28
+ $count = $soundcloud_count;
29
+ }
30
+
inc/frontend/social_network/twitter.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $default_count = isset( $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'default_count' ] ) && $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'default_count' ] != '' ? $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'default_count' ] : '0';
4
+
5
+ $twitter_count = get_transient( 'apsc_twitter' );
6
+ if ( false === $twitter_count ) {
7
+ $count = ($this -> get_twitter_count());
8
+ if ( isset( $count ) && ($count == ' ' || $count == '0') ) {
9
+ $count = $default_count;
10
+ }
11
+ set_transient( 'apsc_twitter', $count, $cache_period );
12
+ } else {
13
+ $count = $twitter_count;
14
+ }
inc/frontend/social_network/youtube.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $social_profile_url = esc_url( $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'channel_url' ] );
4
+ $count = get_transient( 'apsc_youtube' );
5
+ $default_count = isset( $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'default_count' ] ) && $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'default_count' ] != '' ? $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'default_count' ] : '0';
6
+
7
+ if ( false === $count ) {
8
+ $count = $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'subscribers_count' ];
9
+ if ( isset( $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'channel_id' ], $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'api_key' ] ) &&
10
+ $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'channel_id' ] != '' && $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'api_key' ] ) {
11
+ $api_key = $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'api_key' ];
12
+ $channel_id = $apsc_settings[ 'social_profile' ][ 'youtube' ][ 'channel_id' ];
13
+ $api_url = 'https://www.googleapis.com/youtube/v3/channels?part=statistics&id=' . $channel_id . '&key=' . $api_key;
14
+ $connection = wp_remote_get( $api_url, array( 'timeout' => 60 ) );
15
+
16
+ if ( ! is_wp_error( $connection ) ) {
17
+ $response = json_decode( $connection[ 'body' ], true );
18
+ if ( isset( $response[ 'items' ][ 0 ][ 'statistics' ][ 'subscriberCount' ] ) ) {
19
+ $count = $response[ 'items' ][ 0 ][ 'statistics' ][ 'subscriberCount' ];
20
+ set_transient( 'apsc_youtube', $count, $cache_period );
21
+ } else {
22
+ $count = $default_count;
23
+ }
24
+ }
25
+ }
26
+ }
js/backend.js CHANGED
@@ -1,23 +1,98 @@
1
- (function ($) {
2
- $(function () {
3
- //All the backend js for the plugin
4
-
5
- /*
6
- Settings Tabs Switching
7
- */
8
- $('.apsc-tabs-trigger').click(function(){
9
- $('.apsc-tabs-trigger').removeClass('apsc-active-tab');
10
- $(this).addClass('apsc-active-tab');
11
- var board_id = 'apsc-board-'+$(this).attr('id');
12
- $('.apsc-boards-tabs').hide();
13
- $('#'+board_id).show();
14
- });
15
-
16
- /**
17
- * For sortable
18
- */
19
- $('.apsc-sortable').sortable({containment: "parent"});
20
-
21
-
22
- });
 
 
 
 
 
 
 
 
 
 
 
23
  }(jQuery));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($) {
2
+ $(function() {
3
+ //All the backend js for the plugin
4
+
5
+ /*
6
+ Settings Tabs Switching
7
+ */
8
+ $('.apsc-tabs-trigger').click(function() {
9
+ $('.apsc-tabs-trigger').removeClass('apsc-active-tab');
10
+ $(this).addClass('apsc-active-tab');
11
+ var board_id = 'apsc-board-' + $(this).attr('id');
12
+ $('.apsc-boards-tabs').hide();
13
+ $('#' + board_id).show();
14
+ });
15
+
16
+ /**
17
+ * For sortable
18
+ */
19
+ $('.apsc-sortable').sortable({containment: "parent"});
20
+
21
+ $('.apss-facebook-method').click(function() {
22
+ var method = $(this).val();
23
+ if (method === '1') {
24
+ $('.apss-facebook-method-1').show();
25
+ $('.apss-facebook-method-2').hide();
26
+ } else {
27
+ $('.apss-facebook-method-2').show();
28
+ $('.apss-facebook-method-1').hide();
29
+ }
30
+ });
31
+
32
+
33
+ });
34
  }(jQuery));
35
+
36
+ function fbrev_init(data) {
37
+
38
+ var el = document.querySelector('#' + data.widgetId);
39
+ if (!el)
40
+ return;
41
+
42
+ var fbConnectBtn = el.querySelector('#apsc_fb_connect');
43
+ WPacFastjs.on(fbConnectBtn, 'click', function() {
44
+ fbrev_connect(el, data);
45
+ return false;
46
+ });
47
+ }
48
+
49
+ function fbrev_connect(el, data) {
50
+
51
+ fbrev_popup('https://app.widgetpack.com/auth/fbrev?scope=manage_pages,pages_show_list', 670, 520, function() {
52
+ WPacXDM.get('https://embed.widgetpack.com', 'https://app.widgetpack.com/widget/facebook/accesstoken', {}, function(res) {
53
+ WPacFastjs.jsonp('https://graph.facebook.com/me/accounts', {access_token: res.accessToken, limit: 250}, function(res) {
54
+
55
+ var pagesEl = el.querySelector('.apsc-fb-pages-list'),
56
+ idEl = el.querySelector('.apsc-page-id'),
57
+ nameEl = el.querySelector('.apsc-page-name'),
58
+ tokenEl = el.querySelector('.apsc-page-token');
59
+
60
+ WPacFastjs.each(res.data, function(page) {
61
+
62
+ var pageEL = WPacFastjs.create('div', 'apsc-page');
63
+ pageEL.innerHTML = '<img src="https://graph.facebook.com/' + page.id + '/picture" class="apsc-page-photo">' +
64
+ '<div class="apsc-page-name">' + page.name + '</div>';
65
+ pagesEl.appendChild(pageEL);
66
+
67
+ WPacFastjs.on(pageEL, 'click', function() {
68
+ idEl.value = page.id;
69
+ nameEl.value = page.name;
70
+ tokenEl.value = page.access_token;
71
+ jQuery(tokenEl).change();
72
+
73
+ WPacFastjs.remcl(pagesEl.querySelector('.active'), 'active');
74
+ WPacFastjs.addcl(pageEL, 'active');
75
+
76
+ data.cb && data.cb();
77
+ return false;
78
+ });
79
+ });
80
+ });
81
+ });
82
+ });
83
+ return false;
84
+ }
85
+
86
+ function fbrev_popup(url, width, height, cb) {
87
+ var top = top || (screen.height / 2) - (height / 2),
88
+ left = left || (screen.width / 2) - (width / 2),
89
+ win = window.open(url, '', 'location=1,status=1,resizable=yes,width=' + width + ',height=' + height + ',top=' + top + ',left=' + left);
90
+ function check() {
91
+ if (!win || win.closed !== false) {
92
+ cb();
93
+ } else {
94
+ setTimeout(check, 100);
95
+ }
96
+ }
97
+ setTimeout(check, 100);
98
+ }
js/wpac-time.js ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var WPacTime=WPacTime||{getTime:function(a,b,d){return"chat"==d?this.getChatTime(a,b||"en"):d?this.getFormatTime(a,d,b||"en"):this.getDefaultTime(a,b||"en")},getChatTime:function(a,b){var d=((new Date).getTime()-a)/1E3/60/60,c=d/24;return 24>d?this.getFormatTime(a,"HH:mm",b):365>c?this.getFormatTime(a,"dd.MM HH:mm",b):this.getFormatTime(a,"yyyy.MM.dd HH:mm",b)},getDefaultTime:function(a,b){return this.getTimeAgo(a,b)},getTimeAgo:function(a,b){a=((new Date).getTime()-a)/1E3;var d=a/60,c=d/60,e=c/24,
2
+ f=e/365;b=WPacTime.Messages[b]?b:"en";return 45>a?WPacTime.Messages[b].second:90>a?WPacTime.Messages[b].minute:45>d?WPacTime.Messages[b].minutes(d):90>d?WPacTime.Messages[b].hour:24>c?WPacTime.Messages[b].hours(c):48>c?WPacTime.Messages[b].day:30>e?WPacTime.Messages[b].days(e):60>e?WPacTime.Messages[b].month:365>e?WPacTime.Messages[b].months(e):2>f?WPacTime.Messages[b].year:WPacTime.Messages[b].years(f)},getTime12:function(a,b){a=new Date(a);return(a.getHours()%12?a.getHours()%12:12)+":"+a.getMinutes()+
3
+ (12<=a.getHours()?" PM":" AM")},getFormatTime:function(a,b,d){var c=new Date(a),e={SS:c.getMilliseconds(),ss:c.getSeconds(),mm:c.getMinutes(),HH:c.getHours(),hh:(c.getHours()%12?c.getHours()%12:12)+(12<=c.getHours()?"PM":"AM"),dd:c.getDate(),MM:c.getMonth()+1,yyyy:c.getFullYear(),yy:String(c.getFullYear()).toString().substr(2,2),ago:this.getTimeAgo(a,d),12:this.getTime12(a,d)};return b.replace(/(SS|ss|mm|HH|hh|DD|dd|MM|yyyy|yy|ago|12)/g,function(a,b){a=e[b];return 10>a?"0"+a:a})},declineNum:function(a,
4
+ b,d,c){return a+" "+this.declineMsg(a,b,d,c)},declineMsg:function(a,b,d,c,e){var f=a%10;return 1==f&&(1==a||20<a)?b:1<f&&5>f&&(20<a||10>a)?d:a?c:e}};
5
+ WPacTime.Messages={ru:{second:"\u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e",minute:"\u043c\u0438\u043d\u0443\u0442\u0443 \u043d\u0430\u0437\u0430\u0434",minutes:function(a){return WPacTime.declineNum(Math.round(a),"\u043c\u0438\u043d\u0443\u0442\u0430 \u043d\u0430\u0437\u0430\u0434","\u043c\u0438\u043d\u0443\u0442\u044b \u043d\u0430\u0437\u0430\u0434","\u043c\u0438\u043d\u0443\u0442 \u043d\u0430\u0437\u0430\u0434")},hour:"\u0447\u0430\u0441 \u043d\u0430\u0437\u0430\u0434",hours:function(a){return WPacTime.declineNum(Math.round(a),
6
+ "\u0447\u0430\u0441 \u043d\u0430\u0437\u0430\u0434","\u0447\u0430\u0441\u0430 \u043d\u0430\u0437\u0430\u0434","\u0447\u0430\u0441\u043e\u0432 \u043d\u0430\u0437\u0430\u0434")},day:"\u0434\u0435\u043d\u044c \u043d\u0430\u0437\u0430\u0434",days:function(a){return WPacTime.declineNum(Math.round(a),"\u0434\u0435\u043d\u044c \u043d\u0430\u0437\u0430\u0434","\u0434\u043d\u044f \u043d\u0430\u0437\u0430\u0434","\u0434\u043d\u0435\u0439 \u043d\u0430\u0437\u0430\u0434")},month:"\u043c\u0435\u0441\u044f\u0446 \u043d\u0430\u0437\u0430\u0434",
7
+ months:function(a){return WPacTime.declineNum(Math.round(a/30),"\u043c\u0435\u0441\u044f\u0446 \u043d\u0430\u0437\u0430\u0434","\u043c\u0435\u0441\u044f\u0446\u0430 \u043d\u0430\u0437\u0430\u0434","\u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043d\u0430\u0437\u0430\u0434")},year:"\u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434",years:function(a){return WPacTime.declineNum(Math.round(a),"\u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434","\u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434",
8
+ "\u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434")}},en:{second:"just now",minute:"1m ago",minutes:function(a){return Math.round(a)+"m ago"},hour:"1h ago",hours:function(a){return Math.round(a)+"h ago"},day:"a day ago",days:function(a){return Math.round(a)+" days ago"},month:"a month ago",months:function(a){return Math.round(a/30)+" months ago"},year:"a year ago",years:function(a){return Math.round(a)+" years ago"}},uk:{second:"\u0442\u0456\u043b\u044c\u043a\u0438 \u0449\u043e",minute:"\u0445\u0432\u0438\u043b\u0438\u043d\u0443 \u0442\u043e\u043c\u0443",
9
+ minutes:function(a){return WPacTime.declineNum(Math.round(a),"\u0445\u0432\u0438\u043b\u0438\u043d\u0443 \u0442\u043e\u043c\u0443","\u0445\u0432\u0438\u043b\u0438\u043d\u0438 \u0442\u043e\u043c\u0443","\u0445\u0432\u0438\u043b\u0438\u043d \u0442\u043e\u043c\u0443")},hour:"\u0433\u043e\u0434\u0438\u043d\u0443 \u0442\u043e\u043c\u0443",hours:function(a){return WPacTime.declineNum(Math.round(a),"\u0433\u043e\u0434\u0438\u043d\u0443 \u0442\u043e\u043c\u0443","\u0433\u043e\u0434\u0438\u043d\u0438 \u0442\u043e\u043c\u0443",
10
+ "\u0433\u043e\u0434\u0438\u043d \u0442\u043e\u043c\u0443")},day:"\u0434\u0435\u043d\u044c \u0442\u043e\u043c\u0443",days:function(a){return WPacTime.declineNum(Math.round(a),"\u0434\u0435\u043d\u044c \u0442\u043e\u043c\u0443","\u0434\u043d\u0456 \u0442\u043e\u043c\u0443","\u0434\u043d\u0456\u0432 \u0442\u043e\u043c\u0443")},month:"\u043c\u0456\u0441\u044f\u0446\u044c \u0442\u043e\u043c\u0443",months:function(a){return WPacTime.declineNum(Math.round(a/30),"\u043c\u0456\u0441\u044f\u0446\u044c \u0442\u043e\u043c\u0443",
11
+ "\u043c\u0456\u0441\u044f\u0446\u0456 \u0442\u043e\u043c\u0443","\u043c\u0456\u0441\u044f\u0446\u0456\u0432 \u0442\u043e\u043c\u0443")},year:"\u0440\u0456\u043a \u0442\u043e\u043c\u0443",years:function(a){return WPacTime.declineNum(Math.round(a),"\u0440\u0456\u043a \u0442\u043e\u043c\u0443","\u0440\u043e\u043a\u0438 \u0442\u043e\u043c\u0443","\u0440\u043e\u043a\u0456\u0432 \u0442\u043e\u043c\u0443")}},ro:{second:"chiar acum",minute:"\u00een urm\u0103 minut",minutes:function(a){return WPacTime.declineNum(Math.round(a),
12
+ "o minuta in urma","minute in urma","de minute in urma")},hour:"acum o ora",hours:function(a){return WPacTime.declineNum(Math.round(a),"acum o ora","ore in urma","de ore in urma")},day:"o zi in urma",days:function(a){return WPacTime.declineNum(Math.round(a),"o zi in urma","zile in urma","de zile in urma")},month:"o luna in urma",months:function(a){return WPacTime.declineNum(Math.round(a/30),"o luna in urma","luni in urma","de luni in urma")},year:"un an in urma",years:function(a){return WPacTime.declineNum(Math.round(a),
13
+ "un an in urma","ani in urma","de ani in urma")}},lv:{second:"Maz\u0101k par min\u016bti",minute:"Pirms min\u016btes",minutes:function(a){return WPacTime.declineNum(Math.round(a),"pirms min\u016btes","pirms min\u016bt\u0113m","pirms min\u016bt\u0113m")},hour:"pirms stundas",hours:function(a){return WPacTime.declineNum(Math.round(a),"pirms stundas","pirms stund\u0101m","pirms stund\u0101m")},day:"pirms dienas",days:function(a){return WPacTime.declineNum(Math.round(a),"pirms dienas","pirms dien\u0101m",
14
+ "pirms dien\u0101m")},month:"pirms m\u0113ne\u0161a",months:function(a){return WPacTime.declineNum(Math.round(a/30),"pirms m\u0113ne\u0161a","pirms m\u0113ne\u0161iem","pirms m\u0113ne\u0161iem")},year:"pirms gada",years:function(a){return WPacTime.declineNum(Math.round(a),"pirms gada","pirms gadiem","pirms gadiem")}},lt:{second:"k\u0105 tik",minute:"prie\u0161 minut\u0119",minutes:function(a){return WPacTime.declineNum(Math.round(a),"minut\u0117 prie\u0161","minut\u0117s prie\u0161","minu\u010di\u0173 prie\u0161")},
15
+ hour:"prie\u0161 valand\u0105",hours:function(a){return WPacTime.declineNum(Math.round(a),"valanda prie\u0161","valandos prie\u0161","valand\u0173 prie\u0161")},day:"prie\u0161 dien\u0105",days:function(a){return WPacTime.declineNum(Math.round(a),"diena prie\u0161","dienos prie\u0161","dien\u0173 prie\u0161")},month:"prie\u0161 m\u0117nes\u012f",months:function(a){return WPacTime.declineNum(Math.round(a/30),"m\u0117nes\u012f prie\u0161","m\u0117nesiai prie\u0161","m\u0117nesi\u0173 prie\u0161")},
16
+ year:"prie\u0161 metus",years:function(a){return WPacTime.declineNum(Math.round(a),"metai prie\u0161","metai prie\u0161","met\u0173 prie\u0161")}},kk:{second:"\u0431\u0456\u0440 \u043c\u0438\u043d\u0443\u0442\u0442\u0430\u043d \u0430\u0437 \u0443\u0430\u049b\u044b\u0442 \u0431\u04b1\u0440\u044b\u043d",minute:"\u0431\u0456\u0440 \u043c\u0438\u043d\u0443\u0442 \u0431\u04b1\u0440\u044b\u043d",minutes:function(a){return WPacTime.declineNum(Math.round(a),"\u043c\u0438\u043d\u0443\u0442 \u0431\u04b1\u0440\u044b\u043d",
17
+ "\u043c\u0438\u043d\u0443\u0442 \u0431\u04b1\u0440\u044b\u043d","\u043c\u0438\u043d\u0443\u0442 \u0431\u04b1\u0440\u044b\u043d")},hour:"\u0431\u0456\u0440 \u0441\u0430\u0493\u0430\u0442 \u0431\u04b1\u0440\u044b\u043d",hours:function(a){return WPacTime.declineNum(Math.round(a),"\u0441\u0430\u0493\u0430\u0442 \u0431\u04b1\u0440\u044b\u043d","\u0441\u0430\u0493\u0430\u0442 \u0431\u04b1\u0440\u044b\u043d","\u0441\u0430\u0493\u0430\u0442 \u0431\u04b1\u0440\u044b\u043d")},day:"\u0431\u0456\u0440 \u043a\u04af\u043d \u0431\u04b1\u0440\u044b\u043d",
18
+ days:function(a){return WPacTime.declineNum(Math.round(a),"\u043a\u04af\u043d \u0431\u04b1\u0440\u044b\u043d","\u043a\u04af\u043d \u0431\u04b1\u0440\u044b\u043d","\u043a\u04af\u043d \u0431\u04b1\u0440\u044b\u043d")},month:"\u0431\u0456\u0440 \u0430\u0439 \u0431\u04b1\u0440\u044b\u043d",months:function(a){return WPacTime.declineNum(Math.round(a/30),"\u0430\u0439 \u0431\u04b1\u0440\u044b\u043d","\u0430\u0439 \u0431\u04b1\u0440\u044b\u043d","\u0430\u0439 \u0431\u04b1\u0440\u044b\u043d")},year:"\u0431\u0456\u0440 \u0436\u044b\u043b \u0431\u04b1\u0440\u044b\u043d",
19
+ years:function(a){return WPacTime.declineNum(Math.round(a),"\u0436\u044b\u043b \u0431\u04b1\u0440\u044b\u043d","\u0436\u044b\u043b \u0431\u04b1\u0440\u044b\u043d","\u0436\u044b\u043b \u0431\u04b1\u0440\u044b\u043d")}},ka:{second:"\u10ec\u10d0\u10db\u10d8\u10e1 \u10ec\u10d8\u10dc",minute:"\u10ec\u10e3\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc",minutes:function(a){return WPacTime.declineNum(Math.round(a),"\u10ec\u10e3\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10ec\u10e3\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc",
20
+ "\u10ec\u10e3\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc")},hour:"\u10e1\u10d0\u10d0\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc",hours:function(a){return WPacTime.declineNum(Math.round(a),"\u10e1\u10d0\u10d0\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10e1\u10d0\u10d0\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10e1\u10d0\u10d0\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc")},day:"\u10d3\u10e6\u10d8\u10e1 \u10ec\u10d8\u10dc",days:function(a){return WPacTime.declineNum(Math.round(a),"\u10d3\u10e6\u10d8\u10e1 \u10ec\u10d8\u10dc",
21
+ "\u10d3\u10e6\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10d3\u10e6\u10d8\u10e1 \u10ec\u10d8\u10dc")},month:"\u10d7\u10d5\u10d8\u10e1 \u10ec\u10d8\u10dc",months:function(a){return WPacTime.declineNum(Math.round(a/30),"\u10d7\u10d5\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10d7\u10d5\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10d7\u10d5\u10d8\u10e1 \u10ec\u10d8\u10dc")},year:"\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc",years:function(a){return WPacTime.declineNum(Math.round(a),"\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc",
22
+ "\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc")}},hy:{second:"\u0574\u056b \u0584\u0576\u056b \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576 \u0561\u057c\u0561\u057b",minute:"\u0574\u0565\u056f \u0580\u0578\u057a\u0565 \u0561\u057c\u0561\u057b",minutes:function(a){return WPacTime.declineNum(Math.round(a),"\u0580\u0578\u057a\u0565 \u0561\u057c\u0561\u057b","\u0580\u0578\u057a\u0565 \u0561\u057c\u0561\u057b","\u0580\u0578\u057a\u0565 \u0561\u057c\u0561\u057b")},
23
+ hour:"\u0574\u0565\u056f \u056a\u0561\u0574 \u0561\u057c\u0561\u057b",hours:function(a){return WPacTime.declineNum(Math.round(a),"\u056a\u0561\u0574 \u0561\u057c\u0561\u057b","\u056a\u0561\u0574 \u0561\u057c\u0561\u057b","\u056a\u0561\u0574 \u0561\u057c\u0561\u057b")},day:"\u0574\u0565\u056f \u0585\u0580 \u0561\u057c\u0561\u057b",days:function(a){return WPacTime.declineNum(Math.round(a),"\u0585\u0580 \u0561\u057c\u0561\u057b","\u0585\u0580 \u0561\u057c\u0561\u057b","\u0585\u0580 \u0561\u057c\u0561\u057b")},
24
+ month:"\u0574\u0565\u056f \u0561\u0574\u056b\u057d \u0561\u057c\u0561\u057b",months:function(a){return WPacTime.declineNum(Math.round(a/30),"\u0561\u0574\u056b\u057d \u0561\u057c\u0561\u057b","\u0561\u0574\u056b\u057d \u0561\u057c\u0561\u057b","\u0561\u0574\u056b\u057d \u0561\u057c\u0561\u057b")},year:"\u0574\u0565\u056f \u057f\u0561\u0580\u056b \u0561\u057c\u0561\u057b",years:function(a){return WPacTime.declineNum(Math.round(a),"\u057f\u0561\u0580\u056b \u0561\u057c\u0561\u057b","\u057f\u0561\u0580\u056b \u0561\u057c\u0561\u057b",
25
+ "\u057f\u0561\u0580\u056b \u0561\u057c\u0561\u057b")}},fr:{second:"tout \u00e0 l'heure",minute:"environ une minute",minutes:function(a){return Math.round(a)+" minutes"},hour:"environ une heure",hours:function(a){return"environ "+Math.round(a)+" heures"},day:"un jour",days:function(a){return Math.round(a)+" jours"},month:"environ un mois",months:function(a){return Math.round(a/30)+" mois"},year:"environ un an",years:function(a){return Math.round(a)+" ans"}},es:{second:"ahora",minute:"hace un minuto",
26
+ minutes:function(a){return"hace "+Math.round(a)+" minuts"},hour:"hace una hora",hours:function(a){return"hace "+Math.round(a)+" horas"},day:"hace un dia",days:function(a){return"hace "+Math.round(a)+" d\u00edas"},month:"hace un mes",months:function(a){return"hace "+Math.round(a/30)+" meses"},year:"hace a\u00f1os",years:function(a){return"hace "+Math.round(a)+" a\u00f1os"}},el:{second:"\u03bb\u03b9\u03b3\u03cc\u03c4\u03b5\u03c1\u03bf \u03b1\u03c0\u03cc \u03ad\u03bd\u03b1 \u03bb\u03b5\u03c0\u03c4\u03cc",
27
+ minute:"\u03b3\u03cd\u03c1\u03c9 \u03c3\u03c4\u03bf \u03ad\u03bd\u03b1 \u03bb\u03b5\u03c0\u03c4\u03cc",minutes:function(a){return Math.round(a)+" minutes"},hour:"\u03b3\u03cd\u03c1\u03c9 \u03c3\u03c4\u03b7\u03bd \u03bc\u03b9\u03b1 \u03ce\u03c1\u03b1",hours:function(a){return"about "+Math.round(a)+" hours"},day:"\u03bc\u03b9\u03b1 \u03bc\u03ad\u03c1\u03b1",days:function(a){return Math.round(a)+" days"},month:"\u03b3\u03cd\u03c1\u03c9 \u03c3\u03c4\u03bf\u03bd \u03ad\u03bd\u03b1 \u03bc\u03ae\u03bd\u03b1",
28
+ months:function(a){return Math.round(a/30)+" months"},year:"\u03b3\u03cd\u03c1\u03c9 \u03c3\u03c4\u03bf\u03bd \u03ad\u03bd\u03b1 \u03c7\u03c1\u03cc\u03bd\u03bf",years:function(a){return Math.round(a)+" years"}},de:{second:"soeben",minute:"vor einer Minute",minutes:function(a){return"vor "+Math.round(a)+" Minuten"},hour:"vor einer Stunde",hours:function(a){return"vor "+Math.round(a)+" Stunden"},day:"vor einem Tag",days:function(a){return"vor "+Math.round(a)+" Tagen"},month:"vor einem Monat",months:function(a){return"vor "+
29
+ Math.round(a/30)+" Monaten"},year:"vor einem Jahr",years:function(a){return"vor "+Math.round(a)+" Jahren"}},be:{second:"\u043c\u0435\u043d\u0448 \u0437\u0430 \u0445\u0432\u0456\u043b\u0456\u043d\u0443 \u0442\u0430\u043c\u0443",minute:"\u0445\u0432\u0456\u043b\u0456\u043d\u0443 \u0442\u0430\u043c\u0443",minutes:function(a){return WPacTime.declineNum(Math.round(a),"\u0445\u0432\u0456\u043b\u0456\u043d\u0430 \u0442\u0430\u043c\u0443","\u0445\u0432\u0456\u043b\u0456\u043d\u044b \u0442\u0430\u043c\u0443",
30
+ "\u0445\u0432\u0456\u043b\u0456\u043d \u0442\u0430\u043c\u0443")},hour:"\u0433\u0430\u0434\u0437\u0456\u043d\u0443 \u0442\u0430\u043c\u0443",hours:function(a){return WPacTime.declineNum(Math.round(a),"\u0433\u0430\u0434\u0437\u0456\u043d\u0443 \u0442\u0430\u043c\u0443","\u0433\u0430\u0434\u0437\u0456\u043d\u044b \u0442\u0430\u043c\u0443","\u0433\u0430\u0434\u0437\u0456\u043d \u0442\u0430\u043c\u0443")},day:"\u0434\u0437\u0435\u043d\u044c \u0442\u0430\u043c\u0443",days:function(a){return WPacTime.declineNum(Math.round(a),
31
+ "\u0434\u0437\u0435\u043d\u044c \u0442\u0430\u043c\u0443","\u0434\u043d\u0456 \u0442\u0430\u043c\u0443","\u0434\u0437\u0451\u043d \u0442\u0430\u043c\u0443")},month:"\u043c\u0435\u0441\u044f\u0446 \u0442\u0430\u043c\u0443",months:function(a){return WPacTime.declineNum(Math.round(a/30),"\u043c\u0435\u0441\u044f\u0446 \u0442\u0430\u043c\u0443","\u043c\u0435\u0441\u044f\u0446\u0430 \u0442\u0430\u043c\u0443","\u043c\u0435\u0441\u044f\u0446\u0430\u045e \u0442\u0430\u043c\u0443")},year:"\u0433\u043e\u0434 \u0442\u0430\u043c\u0443",
32
+ years:function(a){return WPacTime.declineNum(Math.round(a),"\u0433\u043e\u0434 \u0442\u0430\u043c\u0443","\u0433\u0430\u0434\u044b \u0442\u0430\u043c\u0443","\u0433\u043e\u0434 \u0442\u0430\u043c\u0443")}},it:{second:"proprio ora",minute:"un minuto fa",minutes:function(a){return WPacTime.declineNum(Math.round(a),"un minuto fa","minuti fa","minuti fa")},hour:"un'ora fa",hours:function(a){return WPacTime.declineNum(Math.round(a),"un'ora fa","ore fa","ore fa")},day:"un giorno fa",days:function(a){return WPacTime.declineNum(Math.round(a),
33
+ "un giorno fa","giorni fa","giorni fa")},month:"un mese fa",months:function(a){return WPacTime.declineNum(Math.round(a/30),"un mese fa","mesi fa","mesi fa")},year:"un anno fa",years:function(a){return WPacTime.declineNum(Math.round(a),"un anno fa","anni fa","anni fa")}},tr:{second:"az \u00f6nce",minute:"dakika \u00f6nce",minutes:function(a){return Math.round(a)+" dakika \u00f6nce"},hour:"saat \u00f6nce",hours:function(a){return Math.round(a)+" saat \u00f6nce"},day:"g\u00fcn \u00f6nce",days:function(a){return Math.round(a)+
34
+ " g\u00fcn \u00f6nce"},month:"ay \u00f6nce",months:function(a){return Math.round(a/30)+" ay \u00f6nce"},year:"y\u0131l \u00f6nce",years:function(a){return Math.round(a)+" y\u0131l \u00f6nce"}},nb:{second:"n\u00e5 nettopp",minute:"ett minutt siden",minutes:function(a){return Math.round(a)+" minutter siden"},hour:"en time siden",hours:function(a){return Math.round(a)+" timer siden"},day:"en dag siden",days:function(a){return Math.round(a)+" dager siden"},month:"en m\u00e5ned siden",months:function(a){return Math.round(a/
35
+ 30)+" m\u00e5neder siden"},year:"ett \u00e5r siden",years:function(a){return Math.round(a)+" \u00e5r siden"}},da:{second:"lige nu",minute:"et minut siden",minutes:function(a){return Math.round(a)+" minutter siden"},hour:"en time siden",hours:function(a){return Math.round(a)+" timer siden"},day:"en dag siden",days:function(a){return Math.round(a)+" dage siden"},month:"en m\u00e5ned siden",months:function(a){return Math.round(a/30)+" m\u00e5neder siden"},year:"et \u00e5r siden",years:function(a){return Math.round(a)+
36
+ " \u00e5r siden"}},nl:{second:"zojuist",minute:"minuten geleden",minutes:function(a){return Math.round(a)+" minuten geleden"},hour:"uur geleden",hours:function(a){return Math.round(a)+" uur geleden"},day:"dagen geleden",days:function(a){return Math.round(a)+" dagen geleden"},month:"maand geleden",months:function(a){return Math.round(a/30)+" maanden geleden"},year:"jaar geleden",years:function(a){return Math.round(a)+" jaar geleden"}},ca:{second:"ara mateix",minute:"fa un minut",minutes:function(a){return"fa "+
37
+ Math.round(a)+" minuts"},hour:"fa una hora",hours:function(a){return"fa "+Math.round(a)+" hores"},day:"fa un dia",days:function(a){return"fa "+Math.round(a)+" dies"},month:"fa un mes",months:function(a){return"fa "+Math.round(a/30)+" mesos"},year:"fa un any",years:function(a){return"fa "+Math.round(a)+" anys"}},sv:{second:"just nu",minute:"en minut sen",minutes:function(a){return Math.round(a)+" minuter sen"},hour:"en timme sen",hours:function(a){return Math.round(a)+" timmar sen"},day:"en dag sen",
38
+ days:function(a){return Math.round(a)+" dagar sen"},month:"en m\u00e5nad sen",months:function(a){return Math.round(a/30)+" m\u00e5nader sen"},year:"en \u00e5r sen",years:function(a){return Math.round(a)+" \u00e5r sen"}},pl:{second:"w\u0142a\u015bnie teraz",minute:"minut\u0119 temu",minutes:function(a){return Math.round(a)+" minut temu"},hour:"godzin\u0119 temu",hours:function(a){return Math.round(a)+" godzin temu"},day:"wczoraj",days:function(a){return Math.round(a)+" dni temu"},month:"miesi\u0105c temu",
39
+ months:function(a){return Math.round(a/30)+" miesi\u0119cy temu"},year:"rok temu",years:function(a){return Math.round(a)+" lat temu"}},pt:{second:"agora",minute:"1 minuto atr\u00e1s",minutes:function(a){return Math.round(a)+" minutos atr\u00e1s"},hour:"1 hora atr\u00e1s",hours:function(a){return Math.round(a)+" horas atr\u00e1s"},day:"1 dia atr\u00e1s",days:function(a){return Math.round(a)+" dias atr\u00e1s"},month:"1 m\u00eas atr\u00e1s",months:function(a){return Math.round(a/30)+" meses atr\u00e1s"},
40
+ year:"1 ano atr\u00e1s",years:function(a){return Math.round(a)+" anos atr\u00e1s"}}};
js/wpac.js ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Laura Doktorova https://github.com/olado/doT */
2
+ (function(){function o(){var a={"&":"&#38;","<":"&#60;",">":"&#62;",'"':"&#34;","'":"&#39;","/":"&#47;"},b=/&(?!#?\w+;)|<|>|"|'|\//g;return function(){return this?this.replace(b,function(c){return a[c]||c}):this}}function p(a,b,c){return(typeof b==="string"?b:b.toString()).replace(a.define||i,function(l,e,f,g){if(e.indexOf("def.")===0)e=e.substring(4);if(!(e in c))if(f===":"){a.defineParams&&g.replace(a.defineParams,function(n,h,d){c[e]={arg:h,text:d}});e in c||(c[e]=g)}else(new Function("def","def['"+
3
+ e+"']="+g))(c);return""}).replace(a.use||i,function(l,e){if(a.useParams)e=e.replace(a.useParams,function(g,n,h,d){if(c[h]&&c[h].arg&&d){g=(h+":"+d).replace(/'|\\/g,"_");c.__exp=c.__exp||{};c.__exp[g]=c[h].text.replace(RegExp("(^|[^\\w$])"+c[h].arg+"([^\\w$])","g"),"$1"+d+"$2");return n+"def.__exp['"+g+"']"}});var f=(new Function("def","return "+e))(c);return f?p(a,f,c):f})}function m(a){return a.replace(/\\('|\\)/g,"$1").replace(/[\r\t\n]/g," ")}var j={version:"1.0.1",templateSettings:{evaluate:/\{\{([\s\S]+?(\}?)+)\}\}/g,
4
+ interpolate:/\{\{=([\s\S]+?)\}\}/g,encode:/\{\{!([\s\S]+?)\}\}/g,use:/\{\{#([\s\S]+?)\}\}/g,useParams:/(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g,define:/\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,defineParams:/^\s*([\w$]+):([\s\S]+)/,conditional:/\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g,iterate:/\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g,varname:"it",strip:true,append:true,selfcontained:false},template:undefined,
5
+ compile:undefined},q;q=function(){return this||(0,eval)("this")}();q.doT=j;String.prototype.encodeHTML=o();var r={append:{start:"'+(",end:")+'",endencode:"||'').toString().encodeHTML()+'"},split:{start:"';out+=(",end:");out+='",endencode:"||'').toString().encodeHTML();out+='"}},i=/$^/;j.template=function(a,b,c){b=b||j.templateSettings;var l=b.append?r.append:
6
+ r.split,e,f=0,g;a=b.use||b.define?p(b,a,c||{}):a;a=("var out='"+(b.strip?a.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g," ").replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g,""):a).replace(/'|\\/g,"\\$&").replace(b.interpolate||i,function(h,d){return l.start+m(d)+l.end}).replace(b.encode||i,function(h,d){e=true;return l.start+m(d)+l.endencode}).replace(b.conditional||i,function(h,d,k){return d?k?"';}else if("+m(k)+"){out+='":"';}else{out+='":k?"';if("+m(k)+"){out+='":"';}out+='"}).replace(b.iterate||i,function(h,
7
+ d,k,s){if(!d)return"';} } out+='";f+=1;g=s||"i"+f;d=m(d);return"';var arr"+f+"="+d+";if(arr"+f+"){var "+k+","+g+"=-1,l"+f+"=arr"+f+".length-1;while("+g+"<l"+f+"){"+k+"=arr"+f+"["+g+"+=1];out+='"}).replace(b.evaluate||i,function(h,d){return"';"+m(d)+"out+='"})+"';return out;").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/(\s|;|\}|^|\{)out\+='';/g,"$1").replace(/\+''/g,"").replace(/(\s|;|\}|^|\{)out\+=''\+/g,"$1out+=");if(e&&b.selfcontained)a="String.prototype.encodeHTML=("+
8
+ o.toString()+"());"+a;try{return new Function(b.varname,a)}catch(n){typeof console!=="undefined"&&console.log("Could not create a template function: "+a);throw n;}};j.compile=function(a,b){return j.template(a,null,b)}})();
9
+
10
+ var WPacXDM = WPacXDM || {
11
+
12
+ xdm: {},
13
+
14
+ channel: {},
15
+
16
+ xhr: function(host) {
17
+ if (this.xdm[host] && this.iframe(host)) {
18
+ return this.xdm[host];
19
+ } else {
20
+ return (this.xdm[host] = this.create(host));
21
+ }
22
+ },
23
+
24
+ iframe: function(host) {
25
+ return document.getElementById('easyXDM_' + this.channel[host] + '_provider');
26
+ },
27
+
28
+ create: function(host) {
29
+ var handler = this;
30
+ this.loadEasyXDM();
31
+ return new easyXDM.Rpc({
32
+ remote: host + '/widget/xdm/index.html',
33
+ onReady: function() {
34
+ var iframe = document.getElementById('easyXDM_' + this.channel + '_provider');
35
+ iframe.setAttribute('style', 'position:absolute!important;top:-2000px!important;left:0!important;');
36
+ handler.channel[host] = this.channel;
37
+ }
38
+ },{
39
+ remote: {
40
+ request: {}
41
+ },
42
+ serializer: {
43
+ stringify: function(obj) {
44
+ var clone = {
45
+ id: obj.id,
46
+ jsonrpc: obj.jsonrpc,
47
+ method: obj.method,
48
+ params: obj.params[0]
49
+ };
50
+ return handler.stringify(clone);
51
+ },
52
+ parse: function(string) {
53
+ return JSON.parse(string);
54
+ }
55
+ }
56
+ });
57
+ },
58
+
59
+ //TODO: coz if loaded many times occurs error: undefined is not a function
60
+ //TODO: check this behavior on production with loaded widget from 'a' and 'b'
61
+ loadEasyXDM: function() {
62
+ (function(N,d,p,K,k,H){var b=this;var n=Math.floor(Math.random()*10000);var q=Function.prototype;var Q=/^((http.?:)\/\/([^:\/\s]+)(:\d+)*)/;var R=/[\-\w]+\/\.\.\//;var F=/([^:])\/\//g;var I="";var o={};var M=N.easyXDM;var U="easyXDM_";var E;var y=false;var i;var h;function C(X,Z){var Y=typeof X[Z];return Y=="function"||(!!(Y=="object"&&X[Z]))||Y=="unknown"}function u(X,Y){return !!(typeof(X[Y])=="object"&&X[Y])}function r(X){return Object.prototype.toString.call(X)==="[object Array]"}function c(){var Z="Shockwave Flash",ad="application/x-shockwave-flash";if(!t(navigator.plugins)&&typeof navigator.plugins[Z]=="object"){var ab=navigator.plugins[Z].description;if(ab&&!t(navigator.mimeTypes)&&navigator.mimeTypes[ad]&&navigator.mimeTypes[ad].enabledPlugin){i=ab.match(/\d+/g)}}if(!i){var Y;try{Y=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");i=Array.prototype.slice.call(Y.GetVariable("$version").match(/(\d+),(\d+),(\d+),(\d+)/),1);Y=null}catch(ac){}}if(!i){return false}var X=parseInt(i[0],10),aa=parseInt(i[1],10);h=X>9&&aa>0;return true}var v,x;if(C(N,"addEventListener")){v=function(Z,X,Y){Z.addEventListener(X,Y,false)};x=function(Z,X,Y){Z.removeEventListener(X,Y,false)}}else{if(C(N,"attachEvent")){v=function(X,Z,Y){X.attachEvent("on"+Z,Y)};x=function(X,Z,Y){X.detachEvent("on"+Z,Y)}}else{throw new Error("Browser not supported")}}var W=false,J=[],L;if("readyState" in d){L=d.readyState;W=L=="complete"||(~navigator.userAgent.indexOf("AppleWebKit/")&&(L=="loaded"||L=="interactive"))}else{W=!!d.body}function s(){if(W){return}W=true;for(var X=0;X<J.length;X++){J[X]()}J.length=0}if(!W){if(C(N,"addEventListener")){v(d,"DOMContentLoaded",s)}else{v(d,"readystatechange",function(){if(d.readyState=="complete"){s()}});if(d.documentElement.doScroll&&N===top){var g=function(){if(W){return}try{d.documentElement.doScroll("left")}catch(X){K(g,1);return}s()};g()}}v(N,"load",s)}function G(Y,X){if(W){Y.call(X);return}J.push(function(){Y.call(X)})}function m(){var Z=parent;if(I!==""){for(var X=0,Y=I.split(".");X<Y.length;X++){Z=Z[Y[X]]}}return Z.easyXDM}function e(X){N.easyXDM=M;I=X;if(I){U="easyXDM_"+I.replace(".","_")+"_"}return o}function z(X){return X.match(Q)[3]}function f(X){return X.match(Q)[4]||""}function j(Z){var X=Z.toLowerCase().match(Q);var aa=X[2],ab=X[3],Y=X[4]||"";if((aa=="http:"&&Y==":80")||(aa=="https:"&&Y==":443")){Y=""}return aa+"//"+ab+Y}function B(X){X=X.replace(F,"$1/");if(!X.match(/^(http||https):\/\//)){var Y=(X.substring(0,1)==="/")?"":p.pathname;if(Y.substring(Y.length-1)!=="/"){Y=Y.substring(0,Y.lastIndexOf("/")+1)}X=p.protocol+"//"+p.host+Y+X}while(R.test(X)){X=X.replace(R,"")}return X}function P(X,aa){var ac="",Z=X.indexOf("#");if(Z!==-1){ac=X.substring(Z);X=X.substring(0,Z)}var ab=[];for(var Y in aa){if(aa.hasOwnProperty(Y)){ab.push(Y+"="+H(aa[Y]))}}return X+(y?"#":(X.indexOf("?")==-1?"?":"&"))+ab.join("&")+ac}var S=(function(X){X=X.substring(1).split("&");var Z={},aa,Y=X.length;while(Y--){aa=X[Y].split("=");Z[aa[0]]=k(aa[1])}return Z}(/xdm_e=/.test(p.search)?p.search:p.hash));function t(X){return typeof X==="undefined"}var O=function(){var Y={};var Z={a:[1,2,3]},X='{"a":[1,2,3]}';if(typeof JSON!="undefined"&&typeof JSON.stringify==="function"&&JSON.stringify(Z).replace((/\s/g),"")===X){return JSON}if(Object.toJSON){if(Object.toJSON(Z).replace((/\s/g),"")===X){Y.stringify=Object.toJSON}}if(typeof String.prototype.evalJSON==="function"){Z=X.evalJSON();if(Z.a&&Z.a.length===3&&Z.a[2]===3){Y.parse=function(aa){return aa.evalJSON()}}}if(Y.stringify&&Y.parse){O=function(){return Y};return Y}return null};function T(X,Y,Z){var ab;for(var aa in Y){if(Y.hasOwnProperty(aa)){if(aa in X){ab=Y[aa];if(typeof ab==="object"){T(X[aa],ab,Z)}else{if(!Z){X[aa]=Y[aa]}}}else{X[aa]=Y[aa]}}}return X}function a(){var Y=d.body.appendChild(d.createElement("form")),X=Y.appendChild(d.createElement("input"));X.name=U+"TEST"+n;E=X!==Y.elements[X.name];d.body.removeChild(Y)}function A(Y){if(t(E)){a()}var ac;if(E){ac=d.createElement('<iframe name="'+Y.props.name+'"/>')}else{ac=d.createElement("IFRAME");ac.name=Y.props.name}ac.id=ac.name=Y.props.name;delete Y.props.name;if(typeof Y.container=="string"){Y.container=d.getElementById(Y.container)}if(!Y.container){T(ac.style,{position:"absolute",top:"-2000px",left:"0px"});Y.container=d.body}var ab=Y.props.src;Y.props.src="javascript:false";T(ac,Y.props);ac.border=ac.frameBorder=0;ac.allowTransparency=true;Y.container.appendChild(ac);if(Y.onLoad){v(ac,"load",Y.onLoad)}if(Y.usePost){var aa=Y.container.appendChild(d.createElement("form")),X;aa.target=ac.name;aa.action=ab;aa.method="POST";if(typeof(Y.usePost)==="object"){for(var Z in Y.usePost){if(Y.usePost.hasOwnProperty(Z)){if(E){X=d.createElement('<input name="'+Z+'"/>')}else{X=d.createElement("INPUT");X.name=Z}X.value=Y.usePost[Z];aa.appendChild(X)}}}aa.submit();aa.parentNode.removeChild(aa)}else{ac.src=ab}Y.props.src=ab;return ac}function V(aa,Z){if(typeof aa=="string"){aa=[aa]}var Y,X=aa.length;while(X--){Y=aa[X];Y=new RegExp(Y.substr(0,1)=="^"?Y:("^"+Y.replace(/(\*)/g,".$1").replace(/\?/g,".")+"$"));if(Y.test(Z)){return true}}return false}function l(Z){var ae=Z.protocol,Y;Z.isHost=Z.isHost||t(S.xdm_p);y=Z.hash||false;if(!Z.props){Z.props={}}if(!Z.isHost){Z.channel=S.xdm_c.replace(/["'<>\\]/g,"");Z.secret=S.xdm_s;Z.remote=S.xdm_e.replace(/["'<>\\]/g,"");ae=S.xdm_p;if(Z.acl&&!V(Z.acl,Z.remote)){throw new Error("Access denied for "+Z.remote)}}else{Z.remote=B(Z.remote);Z.channel=Z.channel||"default"+n++;Z.secret=Math.random().toString(16).substring(2);if(t(ae)){if(j(p.href)==j(Z.remote)){ae="4"}else{if(C(N,"postMessage")||C(d,"postMessage")){ae="1"}else{if(Z.swf&&C(N,"ActiveXObject")&&c()){ae="6"}else{if(navigator.product==="Gecko"&&"frameElement" in N&&navigator.userAgent.indexOf("WebKit")==-1){ae="5"}else{if(Z.remoteHelper){ae="2"}else{ae="0"}}}}}}}Z.protocol=ae;switch(ae){case"0":T(Z,{interval:100,delay:2000,useResize:true,useParent:false,usePolling:false},true);if(Z.isHost){if(!Z.local){var ac=p.protocol+"//"+p.host,X=d.body.getElementsByTagName("img"),ad;var aa=X.length;while(aa--){ad=X[aa];if(ad.src.substring(0,ac.length)===ac){Z.local=ad.src;break}}if(!Z.local){Z.local=N}}var ab={xdm_c:Z.channel,xdm_p:0};if(Z.local===N){Z.usePolling=true;Z.useParent=true;Z.local=p.protocol+"//"+p.host+p.pathname+p.search;ab.xdm_e=Z.local;ab.xdm_pa=1}else{ab.xdm_e=B(Z.local)}if(Z.container){Z.useResize=false;ab.xdm_po=1}Z.remote=P(Z.remote,ab)}else{T(Z,{channel:S.xdm_c,remote:S.xdm_e,useParent:!t(S.xdm_pa),usePolling:!t(S.xdm_po),useResize:Z.useParent?false:Z.useResize})}Y=[new o.stack.HashTransport(Z),new o.stack.ReliableBehavior({}),new o.stack.QueueBehavior({encode:true,maxLength:4000-Z.remote.length}),new o.stack.VerifyBehavior({initiate:Z.isHost})];break;case"1":Y=[new o.stack.PostMessageTransport(Z)];break;case"2":if(Z.isHost){Z.remoteHelper=B(Z.remoteHelper)}Y=[new o.stack.NameTransport(Z),new o.stack.QueueBehavior(),new o.stack.VerifyBehavior({initiate:Z.isHost})];break;case"3":Y=[new o.stack.NixTransport(Z)];break;case"4":Y=[new o.stack.SameOriginTransport(Z)];break;case"5":Y=[new o.stack.FrameElementTransport(Z)];break;case"6":if(!i){c()}Y=[new o.stack.FlashTransport(Z)];break}Y.push(new o.stack.QueueBehavior({lazy:Z.lazy,remove:true}));return Y}function D(aa){var ab,Z={incoming:function(ad,ac){this.up.incoming(ad,ac)},outgoing:function(ac,ad){this.down.outgoing(ac,ad)},callback:function(ac){this.up.callback(ac)},init:function(){this.down.init()},destroy:function(){this.down.destroy()}};for(var Y=0,X=aa.length;Y<X;Y++){ab=aa[Y];T(ab,Z,true);if(Y!==0){ab.down=aa[Y-1]}if(Y!==X-1){ab.up=aa[Y+1]}}return ab}function w(X){X.up.down=X.down;X.down.up=X.up;X.up=X.down=null}T(o,{version:"2.4.19.3",query:S,stack:{},apply:T,getJSONObject:O,whenReady:G,noConflict:e});o.DomHelper={on:v,un:x,requiresJSON:function(X){if(!u(N,"JSON")){d.write('<script type="text/javascript" src="'+X+'"><\/script>')}}};(function(){var X={};o.Fn={set:function(Y,Z){X[Y]=Z},get:function(Z,Y){if(!X.hasOwnProperty(Z)){return}var aa=X[Z];if(Y){delete X[Z]}return aa}}}());o.Socket=function(Y){var X=D(l(Y).concat([{incoming:function(ab,aa){Y.onMessage(ab,aa)},callback:function(aa){if(Y.onReady){Y.onReady(aa)}}}])),Z=j(Y.remote);this.origin=j(Y.remote);this.destroy=function(){X.destroy()};this.postMessage=function(aa){X.outgoing(aa,Z)};X.init()};o.Rpc=function(Z,Y){if(Y.local){for(var ab in Y.local){if(Y.local.hasOwnProperty(ab)){var aa=Y.local[ab];if(typeof aa==="function"){Y.local[ab]={method:aa}}}}}var X=D(l(Z).concat([new o.stack.RpcBehavior(this,Y),{callback:function(ac){if(Z.onReady){Z.onReady(ac)}}}]));this.origin=j(Z.remote);this.destroy=function(){X.destroy()};X.init()};o.stack.SameOriginTransport=function(Y){var Z,ab,aa,X;return(Z={outgoing:function(ad,ae,ac){aa(ad);if(ac){ac()}},destroy:function(){if(ab){ab.parentNode.removeChild(ab);ab=null}},onDOMReady:function(){X=j(Y.remote);if(Y.isHost){T(Y.props,{src:P(Y.remote,{xdm_e:p.protocol+"//"+p.host+p.pathname,xdm_c:Y.channel,xdm_p:4}),name:U+Y.channel+"_provider"});ab=A(Y);o.Fn.set(Y.channel,function(ac){aa=ac;K(function(){Z.up.callback(true)},0);return function(ad){Z.up.incoming(ad,X)}})}else{aa=m().Fn.get(Y.channel,true)(function(ac){Z.up.incoming(ac,X)});K(function(){Z.up.callback(true)},0)}},init:function(){G(Z.onDOMReady,Z)}})};o.stack.FlashTransport=function(aa){var ac,X,ab,ad,Y,ae;function af(ah,ag){K(function(){ac.up.incoming(ah,ad)},0)}function Z(ah){var ag=aa.swf+"?host="+aa.isHost;var aj="easyXDM_swf_"+Math.floor(Math.random()*10000);o.Fn.set("flash_loaded"+ah.replace(/[\-.]/g,"_"),function(){o.stack.FlashTransport[ah].swf=Y=ae.firstChild;var ak=o.stack.FlashTransport[ah].queue;for(var al=0;al<ak.length;al++){ak[al]()}ak.length=0});if(aa.swfContainer){ae=(typeof aa.swfContainer=="string")?d.getElementById(aa.swfContainer):aa.swfContainer}else{ae=d.createElement("div");T(ae.style,h&&aa.swfNoThrottle?{height:"20px",width:"20px",position:"fixed",right:0,top:0}:{height:"1px",width:"1px",position:"absolute",overflow:"hidden",right:0,top:0});d.body.appendChild(ae)}var ai="callback=flash_loaded"+H(ah.replace(/[\-.]/g,"_"))+"&proto="+b.location.protocol+"&domain="+H(z(b.location.href))+"&port="+H(f(b.location.href))+"&ns="+H(I);ae.innerHTML="<object height='20' width='20' type='application/x-shockwave-flash' id='"+aj+"' data='"+ag+"'><param name='allowScriptAccess' value='always'></param><param name='wmode' value='transparent'><param name='movie' value='"+ag+"'></param><param name='flashvars' value='"+ai+"'></param><embed type='application/x-shockwave-flash' FlashVars='"+ai+"' allowScriptAccess='always' wmode='transparent' src='"+ag+"' height='1' width='1'></embed></object>"}return(ac={outgoing:function(ah,ai,ag){Y.postMessage(aa.channel,ah.toString());if(ag){ag()}},destroy:function(){try{Y.destroyChannel(aa.channel)}catch(ag){}Y=null;if(X){X.parentNode.removeChild(X);X=null}},onDOMReady:function(){ad=aa.remote;o.Fn.set("flash_"+aa.channel+"_init",function(){K(function(){ac.up.callback(true)})});o.Fn.set("flash_"+aa.channel+"_onMessage",af);aa.swf=B(aa.swf);var ah=z(aa.swf);var ag=function(){o.stack.FlashTransport[ah].init=true;Y=o.stack.FlashTransport[ah].swf;Y.createChannel(aa.channel,aa.secret,j(aa.remote),aa.isHost);if(aa.isHost){if(h&&aa.swfNoThrottle){T(aa.props,{position:"fixed",right:0,top:0,height:"20px",width:"20px"})}T(aa.props,{src:P(aa.remote,{xdm_e:j(p.href),xdm_c:aa.channel,xdm_p:6,xdm_s:aa.secret}),name:U+aa.channel+"_provider"});X=A(aa)}};if(o.stack.FlashTransport[ah]&&o.stack.FlashTransport[ah].init){ag()}else{if(!o.stack.FlashTransport[ah]){o.stack.FlashTransport[ah]={queue:[ag]};Z(ah)}else{o.stack.FlashTransport[ah].queue.push(ag)}}},init:function(){G(ac.onDOMReady,ac)}})};o.stack.PostMessageTransport=function(aa){var ac,ad,Y,Z;function X(ae){if(ae.origin){return j(ae.origin)}if(ae.uri){return j(ae.uri)}if(ae.domain){return p.protocol+"//"+ae.domain}throw"Unable to retrieve the origin of the event"}function ab(af){var ae=X(af);if(ae==Z&&af.data.substring(0,aa.channel.length+1)==aa.channel+" "){ac.up.incoming(af.data.substring(aa.channel.length+1),ae)}}return(ac={outgoing:function(af,ag,ae){Y.postMessage(aa.channel+" "+af,ag||Z);if(ae){ae()}},destroy:function(){x(N,"message",ab);if(ad){Y=null;ad.parentNode.removeChild(ad);ad=null}},onDOMReady:function(){Z=j(aa.remote);if(aa.isHost){var ae=function(af){if(af.data==aa.channel+"-ready"){Y=("postMessage" in ad.contentWindow)?ad.contentWindow:ad.contentWindow.document;x(N,"message",ae);v(N,"message",ab);K(function(){ac.up.callback(true)},0)}};v(N,"message",ae);T(aa.props,{src:P(aa.remote,{xdm_e:j(p.href),xdm_c:aa.channel,xdm_p:1}),name:U+aa.channel+"_provider"});ad=A(aa)}else{v(N,"message",ab);Y=("postMessage" in N.parent)?N.parent:N.parent.document;Y.postMessage(aa.channel+"-ready",Z);K(function(){ac.up.callback(true)},0)}},init:function(){G(ac.onDOMReady,ac)}})};o.stack.FrameElementTransport=function(Y){var Z,ab,aa,X;return(Z={outgoing:function(ad,ae,ac){aa.call(this,ad);if(ac){ac()}},destroy:function(){if(ab){ab.parentNode.removeChild(ab);ab=null}},onDOMReady:function(){X=j(Y.remote);if(Y.isHost){T(Y.props,{src:P(Y.remote,{xdm_e:j(p.href),xdm_c:Y.channel,xdm_p:5}),name:U+Y.channel+"_provider"});ab=A(Y);ab.fn=function(ac){delete ab.fn;aa=ac;K(function(){Z.up.callback(true)},0);return function(ad){Z.up.incoming(ad,X)}}}else{if(d.referrer&&j(d.referrer)!=S.xdm_e){N.top.location=S.xdm_e}aa=N.frameElement.fn(function(ac){Z.up.incoming(ac,X)});Z.up.callback(true)}},init:function(){G(Z.onDOMReady,Z)}})};o.stack.NameTransport=function(ab){var ac;var ae,ai,aa,ag,ah,Y,X;function af(al){var ak=ab.remoteHelper+(ae?"#_3":"#_2")+ab.channel;ai.contentWindow.sendMessage(al,ak)}function ad(){if(ae){if(++ag===2||!ae){ac.up.callback(true)}}else{af("ready");ac.up.callback(true)}}function aj(ak){ac.up.incoming(ak,Y)}function Z(){if(ah){K(function(){ah(true)},0)}}return(ac={outgoing:function(al,am,ak){ah=ak;af(al)},destroy:function(){ai.parentNode.removeChild(ai);ai=null;if(ae){aa.parentNode.removeChild(aa);aa=null}},onDOMReady:function(){ae=ab.isHost;ag=0;Y=j(ab.remote);ab.local=B(ab.local);if(ae){o.Fn.set(ab.channel,function(al){if(ae&&al==="ready"){o.Fn.set(ab.channel,aj);ad()}});X=P(ab.remote,{xdm_e:ab.local,xdm_c:ab.channel,xdm_p:2});T(ab.props,{src:X+"#"+ab.channel,name:U+ab.channel+"_provider"});aa=A(ab)}else{ab.remoteHelper=ab.remote;o.Fn.set(ab.channel,aj)}var ak=function(){var al=ai||this;x(al,"load",ak);o.Fn.set(ab.channel+"_load",Z);(function am(){if(typeof al.contentWindow.sendMessage=="function"){ad()}else{K(am,50)}}())};ai=A({props:{src:ab.local+"#_4"+ab.channel},onLoad:ak})},init:function(){G(ac.onDOMReady,ac)}})};o.stack.HashTransport=function(Z){var ac;var ah=this,af,aa,X,ad,am,ab,al;var ag,Y;function ak(ao){if(!al){return}var an=Z.remote+"#"+(am++)+"_"+ao;((af||!ag)?al.contentWindow:al).location=an}function ae(an){ad=an;ac.up.incoming(ad.substring(ad.indexOf("_")+1),Y)}function aj(){if(!ab){return}var an=ab.location.href,ap="",ao=an.indexOf("#");if(ao!=-1){ap=an.substring(ao)}if(ap&&ap!=ad){ae(ap)}}function ai(){aa=setInterval(aj,X)}return(ac={outgoing:function(an,ao){ak(an)},destroy:function(){N.clearInterval(aa);if(af||!ag){al.parentNode.removeChild(al)}al=null},onDOMReady:function(){af=Z.isHost;X=Z.interval;ad="#"+Z.channel;am=0;ag=Z.useParent;Y=j(Z.remote);if(af){T(Z.props,{src:Z.remote,name:U+Z.channel+"_provider"});if(ag){Z.onLoad=function(){ab=N;ai();ac.up.callback(true)}}else{var ap=0,an=Z.delay/50;(function ao(){if(++ap>an){throw new Error("Unable to reference listenerwindow")}try{ab=al.contentWindow.frames[U+Z.channel+"_consumer"]}catch(aq){}if(ab){ai();ac.up.callback(true)}else{K(ao,50)}}())}al=A(Z)}else{ab=N;ai();if(ag){al=parent;ac.up.callback(true)}else{T(Z,{props:{src:Z.remote+"#"+Z.channel+new Date(),name:U+Z.channel+"_consumer"},onLoad:function(){ac.up.callback(true)}});al=A(Z)}}},init:function(){G(ac.onDOMReady,ac)}})};o.stack.ReliableBehavior=function(Y){var aa,ac;var ab=0,X=0,Z="";return(aa={incoming:function(af,ad){var ae=af.indexOf("_"),ag=af.substring(0,ae).split(",");af=af.substring(ae+1);if(ag[0]==ab){Z="";if(ac){ac(true)}}if(af.length>0){aa.down.outgoing(ag[1]+","+ab+"_"+Z,ad);if(X!=ag[1]){X=ag[1];aa.up.incoming(af,ad)}}},outgoing:function(af,ad,ae){Z=af;ac=ae;aa.down.outgoing(X+","+(++ab)+"_"+af,ad)}})};o.stack.QueueBehavior=function(Z){var ac,ad=[],ag=true,aa="",af,X=0,Y=false,ab=false;function ae(){if(Z.remove&&ad.length===0){w(ac);return}if(ag||ad.length===0||af){return}ag=true;var ah=ad.shift();ac.down.outgoing(ah.data,ah.origin,function(ai){ag=false;if(ah.callback){K(function(){ah.callback(ai)},0)}ae()})}return(ac={init:function(){if(t(Z)){Z={}}if(Z.maxLength){X=Z.maxLength;ab=true}if(Z.lazy){Y=true}else{ac.down.init()}},callback:function(ai){ag=false;var ah=ac.up;ae();ah.callback(ai)},incoming:function(ak,ai){if(ab){var aj=ak.indexOf("_"),ah=parseInt(ak.substring(0,aj),10);aa+=ak.substring(aj+1);if(ah===0){if(Z.encode){aa=k(aa)}ac.up.incoming(aa,ai);aa=""}}else{ac.up.incoming(ak,ai)}},outgoing:function(al,ai,ak){if(Z.encode){al=H(al)}var ah=[],aj;if(ab){while(al.length!==0){aj=al.substring(0,X);al=al.substring(aj.length);ah.push(aj)}while((aj=ah.shift())){ad.push({data:ah.length+"_"+aj,origin:ai,callback:ah.length===0?ak:null})}}else{ad.push({data:al,origin:ai,callback:ak})}if(Y){ac.down.init()}else{ae()}},destroy:function(){af=true;ac.down.destroy()}})};o.stack.VerifyBehavior=function(ab){var ac,aa,Y,Z=false;function X(){aa=Math.random().toString(16).substring(2);ac.down.outgoing(aa)}return(ac={incoming:function(af,ad){var ae=af.indexOf("_");if(ae===-1){if(af===aa){ac.up.callback(true)}else{if(!Y){Y=af;if(!ab.initiate){X()}ac.down.outgoing(af)}}}else{if(af.substring(0,ae)===Y){ac.up.incoming(af.substring(ae+1),ad)}}},outgoing:function(af,ad,ae){ac.down.outgoing(aa+"_"+af,ad,ae)},callback:function(ad){if(ab.initiate){X()}}})};o.stack.RpcBehavior=function(ad,Y){var aa,af=Y.serializer||O();var ae=0,ac={};function X(ag){ag.jsonrpc="2.0";aa.down.outgoing(af.stringify(ag))}function ab(ag,ai){var ah=Array.prototype.slice;return function(){var aj=arguments.length,al,ak={method:ai};if(aj>0&&typeof arguments[aj-1]==="function"){if(aj>1&&typeof arguments[aj-2]==="function"){al={success:arguments[aj-2],error:arguments[aj-1]};ak.params=ah.call(arguments,0,aj-2)}else{al={success:arguments[aj-1]};ak.params=ah.call(arguments,0,aj-1)}ac[""+(++ae)]=al;ak.id=ae}else{ak.params=ah.call(arguments,0)}if(ag.namedParams&&ak.params.length===1){ak.params=ak.params[0]}X(ak)}}function Z(an,am,ai,al){if(!ai){if(am){X({id:am,error:{code:-32601,message:"Procedure not found."}})}return}var ak,ah;if(am){ak=function(ao){ak=q;X({id:am,result:ao})};ah=function(ao,ap){ah=q;var aq={id:am,error:{code:-32099,message:ao}};if(ap){aq.error.data=ap}X(aq)}}else{ak=ah=q}if(!r(al)){al=[al]}try{var ag=ai.method.apply(ai.scope,al.concat([ak,ah]));if(!t(ag)){ak(ag)}}catch(aj){ah(aj.message)}}return(aa={incoming:function(ah,ag){var ai=af.parse(ah);if(ai.method){if(Y.handle){Y.handle(ai,X)}else{Z(ai.method,ai.id,Y.local[ai.method],ai.params)}}else{var aj=ac[ai.id];if(ai.error){if(aj.error){aj.error(ai.error)}}else{if(aj.success){aj.success(ai.result)}}delete ac[ai.id]}},init:function(){if(Y.remote){for(var ag in Y.remote){if(Y.remote.hasOwnProperty(ag)){ad[ag]=ab(Y.remote[ag],ag)}}}aa.down.init()},destroy:function(){for(var ag in Y.remote){if(Y.remote.hasOwnProperty(ag)&&ad.hasOwnProperty(ag)){delete ad[ag]}}aa.down.destroy()}})};b.easyXDM=o})(window,document,location,window.setTimeout,decodeURIComponent,encodeURIComponent);
63
+ },
64
+
65
+ get: function(xhrhost, url, data, success, complete) {
66
+ this.send(xhrhost, url, 'GET', data, success, complete);
67
+ },
68
+
69
+ post: function(xhrhost, url, data, success, complete) {
70
+ this.send(xhrhost, url, 'POST', data, success, complete);
71
+ },
72
+
73
+ send: function(xhrhost, url, type, data, success, complete) {
74
+ if (data) {
75
+ for (d in data) {
76
+ if (data.hasOwnProperty(d)) {
77
+ var val = data[d];
78
+ if (typeof val == 'string') {
79
+ data[d] = this.escape(val);
80
+ } else if (typeof val == 'undefined') {
81
+ delete data[d];
82
+ }
83
+ }
84
+ }
85
+ }
86
+ this.xhr(xhrhost).request({url: url, method: type, headers: {'Accept': 'application/json;'}, data: data},
87
+ function(res) {
88
+ if (success) {
89
+ if (res.data) {
90
+ var json;
91
+ try { json = JSON.parse(res.data); } catch (e) {}
92
+ success(json || res.data);
93
+ } else {
94
+ success();
95
+ }
96
+ }
97
+ if (complete) complete();
98
+ }, function(res) {
99
+ if (complete) complete();
100
+ }
101
+ );
102
+ },
103
+
104
+ escape: function(str) {
105
+ var escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
106
+ meta = {'\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\'};
107
+
108
+ escapable.lastIndex = 0;
109
+ return escapable.test(str) ?
110
+ str.replace(escapable, function (a) {
111
+ var c = meta[a];
112
+ return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
113
+ }) : str;
114
+ },
115
+
116
+ stringify: function (obj) {
117
+ var t = typeof (obj);
118
+ if (t != "object" || obj === null) {
119
+ if (t == "string"){obj = '"'+obj+'"';}
120
+ return String(obj);
121
+ }
122
+ else {
123
+ var n, v, json = [], arr = (obj && obj.constructor == Array);
124
+ for (n in obj) {
125
+ if (obj.hasOwnProperty(n)) {
126
+ v = obj[n]; t = typeof(v);
127
+ if (t == "string"){v = '"'+v+'"';}else if (t == "object" && v !== null){v = this.stringify(v);}
128
+ json.push((arr ? "" : '"' + n + '":') + String(v));
129
+ }
130
+ }
131
+ return (arr ? "[" : "{") + String(json) + (arr ? "]" : "}");
132
+ }
133
+ }
134
+ };
135
+ "object"!==typeof JSON&&(JSON={});
136
+ (function(){function a(a){return 10>a?"0"+a:a}function b(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=h[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(a,d){var e,h,m,q,r=f,l,k=d[a];k&&("object"===typeof k&&"function"===typeof k.toJSON)&&(k=k.toJSON(a));"function"===typeof n&&(k=n.call(d,a,k));switch(typeof k){case "string":return b(k);case "number":return isFinite(k)?String(k):"null";case "boolean":case "null":return String(k);
137
+ case "object":if(!k)return"null";f+=g;l=[];if("[object Array]"===Object.prototype.toString.apply(k)){q=k.length;for(e=0;e<q;e+=1)l[e]=c(e,k)||"null";m=0===l.length?"[]":f?"[\n"+f+l.join(",\n"+f)+"\n"+r+"]":"["+l.join(",")+"]";f=r;return m}if(n&&"object"===typeof n)for(q=n.length,e=0;e<q;e+=1)"string"===typeof n[e]&&(h=n[e],(m=c(h,k))&&l.push(b(h)+(f?": ":":")+m));else for(h in k)Object.prototype.hasOwnProperty.call(k,h)&&(m=c(h,k))&&l.push(b(h)+(f?": ":":")+m);m=0===l.length?"{}":f?"{\n"+f+l.join(",\n"+
138
+ f)+"\n"+r+"}":"{"+l.join(",")+"}";f=r;return m}}"function"!==typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var d,e,f,g,h,n;"function"!==typeof JSON.stringify&&(e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
139
+ h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((n=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});"function"!==typeof JSON.parse&&(d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,JSON.parse=function(a,
140
+ b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=String(a);d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=
141
+ eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();var WPacFastjs=WPacFastjs||{emailRegex:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,get:function(a,b){return document.querySelector(a+" "+b)},extend:function(a,b){var c={},d;for(d in a)Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=a[d]);for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(c[d]=b[d]);return c},create:function(a,b,c,d){a=document.createElement(a);b&&this.addcl(a,b);c&&
142
+ a.setAttribute("title",c);d&&a.setAttribute("style",d);return a},addcls:function(a,b){for(var c=0;c<b.length;c++){var d=b[c];0>a.className.indexOf(d)&&(a.className+=" "+d)}},addcl:function(a,b){a&&0>a.className.indexOf(b)&&(a.className+=" "+b,a.className=a.className.trim())},remcl:function(a,b){a&&(a.className=a.className.replace(b," "))},hascl:function(a,b){return a&&-1<a.className.indexOf(b)},on:function(a,b,c){if(a){var d=this;a.addEventListener?a.addEventListener(b,function(b){!1==c.call(a,b)&&
143
+ d.stop(b)},!1):a.attachEvent("on"+b,function(b){b.stopPropagation=b.stopPropagation||function(){this.cancelBubble=!0};b.preventDefault=b.preventDefault||function(){this.returnValue=!1};!1==c.call(a,b)&&d.stop(b)})}},on2:function(a,b,c,d){if(a&&(a=a.querySelector(b)))this.on(a,c,d)},onall:function(a,b,c){for(var d=0;d<a.length;d++)this.on(a[d],b,c)},onall2:function(a,b,c,d){this.onall(a.querySelectorAll(b),c,d)},stop:function(a){a.preventDefault();a.stopPropagation()},parents:function(a,b){var c=a.parentNode,
144
+ d=!1;this.each(c.className.split(" "),function(a){!d&&(d=a==b)});return d?c:this.parents(c,b)},parentsel:function(a,b){var c=a.parentNode;return 0>c.tagName.toLowerCase().indexOf(b)?this.parentsel(c,b):c},show:function(a,b){var c=b.querySelector(a);this.show2(c)},show2:function(a){a&&(a.style.display="")},hide:function(a,b){var c=b.querySelector(a);this.hide2(c)},hide2:function(a){a&&(a.style.display="none")},html:function(a,b){a&&(a.innerHTML="",this.isString(b)?a.innerHTML=b:a.appendChild(b))},
145
+ prepend:function(a,b){a.insertBefore(b,a.firstChild)},rm:function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},rm2:function(a,b){var c=a.querySelector(b);this.rm(c)},each:function(a,b){if("undefined"==typeof a.length)b(a,0);else for(var c=0;c<a.length;c++)b(a[c],c)},css:function(a,b,c){this.isInteger(c)&&(c+="px");a.style[b]=c},child:function(a,b){for(var c=a.children.length;c--;){var d=a.children[c];if(8!=d.nodeType&&-1<d.className.indexOf(b))return d}},children:function(a){for(var b=[],c=a.children.length;c--;)8!=
146
+ a.children[c].nodeType&&b.unshift(a.children[c]);return b},icss:function(a,b){return a+":"+b+"px!important;"},transCss:function(a,b){var c="overflow-y:hidden!important;-webkit-transition:"+b+" .5s ease-in-out!important;-moz-transition:"+b+" .5s ease-in-out!important;-o-transition:"+b+" .5s ease-in-out!important;transition:"+b+" .5s ease-in-out!important;";a.setAttribute("style",c);return c},prependSlide:function(a,b){var c=this,d=this.transCss(a,"max-height");b.insertBefore(a,b.firstChild);var e=
147
+ a.offsetHeight;a.setAttribute("style",this.icss("max-height",0)+d);setTimeout(function(){a.setAttribute("style",c.icss("max-height",e)+d);setTimeout(function(){a.setAttribute("style","")},1E3)},1)},slidedwn:function(a){a.style.display="";var b=a.offsetHeight;a.setAttribute("style",this.transCss(a,"height"));a.style.height="0";setTimeout(function(){a.style.height=b+"px";setTimeout(function(){a.setAttribute("style","")},500)},5)},slideup:function(a,b){a.setAttribute("style",this.transCss(a,"height"));
148
+ a.style.height=a.offsetHeight+"px";setTimeout(function(){a.style.height="0";setTimeout(function(){a.setAttribute("style","display:none");b&&b()},500)},5)},title:function(){var a=document.getElementsByTagName("title")[0];return a&&a.textContent||""},nextES:function(a){do a=a.nextSibling;while(a&&1!==a.nodeType);return a},next:function(a){return a.nextElementSibling||this.nextES(a)},prevES:function(a){do a=a.previousSibling;while(a&&1!==a.nodeType);return a},prev:function(a){return a.previousElementSibling||
149
+ this.prevES(a)},after:function(a,b){a.parentNode.insertBefore(b,a.nextSibling)},before:function(a,b){a.parentNode.insertBefore(b,a)},isVisible:function(a){return 0<a.offsetWidth&&0<a.offsetHeight},isInteger:function(a){return a&&0===a%1},isString:function(a){return"string"==typeof a},afun:function(a){var b="wpac_"+Math.floor(1000001*Math.random());window[b]=function(c){window[b]=void 0;try{delete window[b]}catch(d){}a(c)};return b},params:function(a,b,c){var d=[];if(b)for(p in b)d.push(encodeURIComponent(p)+
150
+ "="+encodeURIComponent(b[p]));c&&d.push("callback="+this.afun(c));return 0<d.length?(b=0>a.indexOf("?")?"?":"&",a+(b+d.join("&"))):a},jsonp:function(a,b,c){var d=document.createElement("script");d.src=this.params(a,b,c);d.type="text/javascript";(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(d)},popup:function(a,b,c,d,e,f){e=e||screen.height/2-c/2;f=f||screen.width/2-b/2;return window.open(this.params(a,d),"","location=1,status=1,resizable=yes,width="+
151
+ b+",height="+c+",top="+e+",left="+f)},inArray:function(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1},txt:function(a,b){"textContent"in a?a.textContent=b:a.innerText=b},cbs:function(a,b,c,d){if(a.callback&&(a=a.callback[b])&&0<a.length)for(b=0;b<a.length;b++)if(d)a[b].call(d,c);else a[b](c)},extendcbs:function(a,b){a.callback=a.callback||{};for(cb in b)Object.prototype.hasOwnProperty.call(b,cb)&&(Object.prototype.hasOwnProperty.call(a.callback,cb)||(a.callback[cb]=[]),a.callback[cb].push(b[cb]));
152
+ return a.callback},isemail:function(a){return this.emailRegex.test(a)},getParam:function(a){if(location.search&&-1<location.search.indexOf(a)){if(!this.urlparams){this.urlParams={};var b=this;location.search.substr(1).split("&").forEach(function(a){a=a.split("=");b.urlParams[a[0]]=decodeURIComponent(a[1])})}return this.urlParams[a]}},urlsToHyperlinks:function(a){return a.replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,'<a href="$1" target="_blank">$1</a>').replace(/(^|[^\/])(www\.[\S]+(\b|$))/ig,
153
+ '$1<a href="http://$2" target="_blank" rel="nofollow">$2</a>')},escapeHtml:function(a){return a?document.createElement("div").appendChild(document.createTextNode(a)).parentNode.innerHTML:""},escapeHtmlWithLinks:function(a){return this.urlsToHyperlinks(this.escapeHtml(a))}};String.prototype.trim||(String.prototype.trim=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")});String.prototype.capitalize||(String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)});var WPacSVGIcon=WPacSVGIcon||function(){var a=function(a,b,c,g,h){return'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+a+'" height="'+b+'" viewBox="'+(h||"0 0 1792 1792")+'"><path d="'+g+'"'+(c?' fill="'+c+'"':"")+"/></svg>"},b=function(a,b,c,g,h){return'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+a+'" height="'+b+'" viewBox="'+c+'"><g transform="translate('+g+') scale(0.05,-0.05)"><path fill="#fff" d="'+h+'"></path></g></svg>'},c={star_o:"M1201 1004l306-297-422-62-189-382-189 382-422 62 306 297-73 421 378-199 377 199zm527-357q0 22-26 48l-363 354 86 500q1 7 1 20 0 50-41 50-19 0-40-12l-449-236-449 236q-22 12-40 12-21 0-31.5-14.5t-10.5-35.5q0-6 2-20l86-500-364-354q-25-27-25-48 0-37 56-46l502-73 225-455q19-41 49-41t49 41l225 455 502 73q56 9 56 46z",
154
+ star_half:"M1250 957l257-250-356-52-66-10-30-60-159-322v963l59 31 318 168-60-355-12-66zm452-262l-363 354 86 500q5 33-6 51.5t-34 18.5q-17 0-40-12l-449-236-449 236q-23 12-40 12-23 0-34-18.5t-6-51.5l86-500-364-354q-32-32-23-59.5t54-34.5l502-73 225-455q20-41 49-41 28 0 49 41l225 455 502 73q45 7 54 34.5t-24 59.5z",star:"M1728 647q0 22-26 48l-363 354 86 500q1 7 1 20 0 21-10.5 35.5t-30.5 14.5q-19 0-40-12l-449-236-449 236q-22 12-40 12-21 0-31.5-14.5t-10.5-35.5q0-6 2-20l86-500-364-354q-25-27-25-48 0-37 56-46l502-73 225-455q19-41 49-41t49 41l225 455 502 73q56 9 56 46z"};
155
+ return{path:c,star_o:a(22,22,"#ccc",c.star_o),star_half:a(22,22,"#ff9800",c.star_half),star:a(22,22,"#ff9800",c.star),pencil:a(14,14,"#666","M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z"),caret:a(14,14,"#666","M1408 704q0 26-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45t19-45 45-19h896q26 0 45 19t19 45z"),
156
+ check:a(14,14,"#666","M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z"),reply:a(14,14,"#666","M1792 640q0 26-19 45l-512 512q-19 19-45 19t-45-19-19-45v-256h-224q-98 0-175.5 6t-154 21.5-133 42.5-105.5 69.5-80 101-48.5 138.5-17.5 181q0 55 5 123 0 6 2.5 23.5t2.5 26.5q0 15-8.5 25t-23.5 10q-16 0-28-17-7-9-13-22t-13.5-30-10.5-24q-127-285-127-451 0-199 53-333 162-403 875-403h224v-256q0-26 19-45t45-19 45 19l512 512q19 19 19 45z"),
157
+ reply_sm:a(14,14,"#666","M7 0v3.675a11.411 11.411 0 0 1-2.135-.244 10.511 10.511 0 0 1-1.983-.635 5.92 5.92 0 0 1-1.715-1.13A4.975 4.975 0 0 1 0 .012c.047 1.075.206 2.045.479 2.912A7.68 7.68 0 0 0 1.686 5.28c.533.704 1.248 1.266 2.147 1.685.898.42 1.954.66 3.167.726V11l7-5.53L7 0","0 0 14 11"),edit:a(14,14,"#666","M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z"),
158
+ trash:a(14,14,"#666","M704 1376v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm-544-992h448l-48-117q-7-9-17-11h-317q-10 2-17 11zm928 32v64q0 14-9 23t-23 9h-96v948q0 83-47 143.5t-113 60.5h-832q-66 0-113-58.5t-47-141.5v-952h-96q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h309l70-167q15-37 54-63t79-26h320q40 0 79 26t54 63l70 167h309q14 0 23 9t9 23z"),
159
+ like:a(14,14,"#666","M0,535.5h102v-306H0V535.5z M561,255c0-28.05-22.95-51-51-51H349.35l25.5-117.3c0-2.55,0-5.1,0-7.65 c0-10.2-5.1-20.4-10.199-28.05L336.6,25.5L168.3,193.8c-10.2,7.65-15.3,20.4-15.3,35.7v255c0,28.05,22.95,51,51,51h229.5 c20.4,0,38.25-12.75,45.9-30.6l76.5-181.051c2.55-5.1,2.55-12.75,2.55-17.85v-51H561C561,257.55,561,255,561,255z","0 0 561 561"),unlike:a(14,14,"#666","M357,25.5H127.5c-20.4,0-38.25,12.75-45.9,30.6L5.1,237.15C2.55,242.25,0,247.35,0,255v48.45l0,0V306 c0,28.05,22.95,51,51,51h160.65l-25.5,117.3c0,2.55,0,5.101,0,7.65c0,10.2,5.1,20.399,10.2,28.05l28.05,25.5l168.3-168.3 c10.2-10.2,15.3-22.95,15.3-35.7v-255C408,48.45,385.05,25.5,357,25.5z M459,25.5v306h102v-306H459z",
160
+ "0 0 561 561"),paperclip:a(14,14,"#666","M1596 1385q0 117-79 196t-196 79q-135 0-235-100l-777-776q-113-115-113-271 0-159 110-270t269-111q158 0 273 113l605 606q10 10 10 22 0 16-30.5 46.5t-46.5 30.5q-13 0-23-10l-606-607q-79-77-181-77-106 0-179 75t-73 181q0 105 76 181l776 777q63 63 145 63 64 0 106-42t42-106q0-82-63-145l-581-581q-26-24-60-24-29 0-48 19t-19 48q0 32 25 59l410 410q10 10 10 22 0 16-31 47t-47 31q-12 0-22-10l-410-410q-63-61-63-149 0-82 57-139t139-57q88 0 149 63l581 581q100 98 100 235z","0 0 1792 1792"),
161
+ clock:a(14,14,"#666","M1024 544v448q0 14-9 23t-23 9h-320q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h224v-352q0-14 9-23t23-9h64q14 0 23 9t9 23zm416 352q0-148-73-273t-198-198-273-73-273 73-198 198-73 273 73 273 198 198 273 73 273-73 198-198 73-273zm224 0q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z","0 0 1792 1792"),menu:a(14,14,"#666","M1664 1344v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm0-512v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm0-512v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45z",
162
+ "0 0 1792 1792"),link:a(14,14,"#666","M1520 1216q0-40-28-68l-208-208q-28-28-68-28-42 0-72 32 3 3 19 18.5t21.5 21.5 15 19 13 25.5 3.5 27.5q0 40-28 68t-68 28q-15 0-27.5-3.5t-25.5-13-19-15-21.5-21.5-18.5-19q-33 31-33 73 0 40 28 68l206 207q27 27 68 27 40 0 68-26l147-146q28-28 28-67zm-703-705q0-40-28-68l-206-207q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l208 208q27 27 68 27 42 0 72-31-3-3-19-18.5t-21.5-21.5-15-19-13-25.5-3.5-27.5q0-40 28-68t68-28q15 0 27.5 3.5t25.5 13 19 15 21.5 21.5 18.5 19q33-31 33-73zm895 705q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-206-207q-83-83-83-203 0-123 88-209l-88-88q-86 88-208 88-120 0-204-84l-208-208q-84-84-84-204t85-203l147-146q83-83 203-83 121 0 204 85l206 207q83 83 83 203 0 123-88 209l88 88q86-88 208-88 120 0 204 84l208 208q84 84 84 204z",
163
+ "0 0 1792 1792"),share:a(14,14,"#666","M1344 1024q133 0 226.5 93.5t93.5 226.5-93.5 226.5-226.5 93.5-226.5-93.5-93.5-226.5q0-12 2-34l-360-180q-92 86-218 86-133 0-226.5-93.5t-93.5-226.5 93.5-226.5 226.5-93.5q126 0 218 86l360-180q-2-22-2-34 0-133 93.5-226.5t226.5-93.5 226.5 93.5 93.5 226.5-93.5 226.5-226.5 93.5q-126 0-218-86l-360 180q2 22 2 34t-2 34l360 180q92-86 218-86z","0 0 1792 1792"),smile:a(14,14,"#666","M1262 1075q-37 121-138 195t-228 74-228-74-138-195q-8-25 4-48.5t38-31.5q25-8 48.5 4t31.5 38q25 80 92.5 129.5t151.5 49.5 151.5-49.5 92.5-129.5q8-26 32-38t49-4 37 31.5 4 48.5zm-494-435q0 53-37.5 90.5t-90.5 37.5-90.5-37.5-37.5-90.5 37.5-90.5 90.5-37.5 90.5 37.5 37.5 90.5zm512 0q0 53-37.5 90.5t-90.5 37.5-90.5-37.5-37.5-90.5 37.5-90.5 90.5-37.5 90.5 37.5 37.5 90.5zm256 256q0-130-51-248.5t-136.5-204-204-136.5-248.5-51-248.5 51-204 136.5-136.5 204-51 248.5 51 248.5 136.5 204 204 136.5 248.5 51 248.5-51 204-136.5 136.5-204 51-248.5zm128 0q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z",
164
+ "0 0 1792 1792"),image:a(14,14,"#666","M576 576q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1024 384v448h-1408v-192l320-320 160 160 512-512zm96-704h-1600q-13 0-22.5 9.5t-9.5 22.5v1216q0 13 9.5 22.5t22.5 9.5h1600q13 0 22.5-9.5t9.5-22.5v-1216q0-13-9.5-22.5t-22.5-9.5zm160 32v1216q0 66-47 113t-113 47h-1600q-66 0-113-47t-47-113v-1216q0-66 47-113t113-47h1600q66 0 113 47t47 113z","0 0 1792 1792"),search:a(14,14,"#666","M1216 832q0-185-131.5-316.5t-316.5-131.5-316.5 131.5-131.5 316.5 131.5 316.5 316.5 131.5 316.5-131.5 131.5-316.5zm512 832q0 52-38 90t-90 38q-54 0-90-38l-343-342q-179 124-399 124-143 0-273.5-55.5t-225-150-150-225-55.5-273.5 55.5-273.5 150-225 225-150 273.5-55.5 273.5 55.5 225 150 150 225 55.5 273.5q0 220-124 399l343 343q37 37 37 90z",
165
+ "0 0 1792 1792"),signin:a(14,14,"#666","M1312 896q0 26-19 45l-544 544q-19 19-45 19t-45-19-19-45v-288h-448q-26 0-45-19t-19-45v-384q0-26 19-45t45-19h448v-288q0-26 19-45t45-19 45 19l544 544q19 19 19 45zm352-352v704q0 119-84.5 203.5t-203.5 84.5h-320q-13 0-22.5-9.5t-9.5-22.5q0-4-1-20t-.5-26.5 3-23.5 10-19.5 20.5-6.5h320q66 0 113-47t47-113v-704q0-66-47-113t-113-47h-312l-11.5-1-11.5-3-8-5.5-7-9-2-13.5q0-4-1-20t-.5-26.5 3-23.5 10-19.5 20.5-6.5h320q119 0 203.5 84.5t84.5 203.5z","0 0 1792 1792"),comments:a(14,
166
+ 14,"#666","M1408 768q0 139-94 257t-256.5 186.5-353.5 68.5q-86 0-176-16-124 88-278 128-36 9-86 16h-3q-11 0-20.5-8t-11.5-21q-1-3-1-6.5t.5-6.5 2-6l2.5-5 3.5-5.5 4-5 4.5-5 4-4.5q5-6 23-25t26-29.5 22.5-29 25-38.5 20.5-44q-124-72-195-177t-71-224q0-139 94-257t256.5-186.5 353.5-68.5 353.5 68.5 256.5 186.5 94 257zm384 256q0 120-71 224.5t-195 176.5q10 24 20.5 44t25 38.5 22.5 29 26 29.5 23 25q1 1 4 4.5t4.5 5 4 5 3.5 5.5l2.5 5 2 6 .5 6.5-1 6.5q-3 14-13 22t-22 7q-50-7-86-16-154-40-278-128-90 16-176 16-271 0-472-132 58 4 88 4 161 0 309-45t264-129q125-92 192-212t67-254q0-77-23-152 129 71 204 178t75 230z",
167
+ "0 0 1792 1792"),angle_down:a(14,14,"#666","M1395 736q0 13-10 23l-466 466q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l393 393 393-393q10-10 23-10t23 10l50 50q10 10 10 23z","0 0 1792 1792"),code:a(14,14,null,"M553 1399l-50 50q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23t-10 23l-393 393 393 393q10 10 10 23t-10 23zm591-1067l-373 1291q-4 13-15.5 19.5t-23.5 2.5l-62-17q-13-4-19.5-15.5t-2.5-24.5l373-1291q4-13 15.5-19.5t23.5-2.5l62 17q13 4 19.5 15.5t2.5 24.5zm657 651l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23t-10 23z"),
168
+ wordpress:a(14,14,null,"M127 896q0-163 67-313l367 1005q-196-95-315-281t-119-411zm1288-39q0 19-2.5 38.5t-10 49.5-11.5 44-17.5 59-17.5 58l-76 256-278-826q46-3 88-8 19-2 26-18.5t-2.5-31-28.5-13.5l-205 10q-75-1-202-10-12-1-20.5 5t-11.5 15-1.5 18.5 9 16.5 19.5 8l80 8 120 328-168 504-280-832q46-3 88-8 19-2 26-18.5t-2.5-31-28.5-13.5l-205 10q-7 0-23-.5t-26-.5q105-160 274.5-253.5t367.5-93.5q147 0 280.5 53t238.5 149h-10q-55 0-92 40.5t-37 95.5q0 12 2 24t4 21.5 8 23 9 21 12 22.5 12.5 21 14.5 24 14 23q63 107 63 212zm-506 106l237 647q1 6 5 11-126 44-255 44-112 0-217-32zm661-436q95 174 95 369 0 209-104 385.5t-279 278.5l235-678q59-169 59-276 0-42-6-79zm-674-527q182 0 348 71t286 191 191 286 71 348-71 348-191 286-286 191-348 71-348-71-286-191-191-286-71-348 71-348 191-286 286-191 348-71zm0 1751q173 0 331.5-68t273-182.5 182.5-273 68-331.5-68-331.5-182.5-273-273-182.5-331.5-68-331.5 68-273 182.5-182.5 273-68 331.5 68 331.5 182.5 273 273 182.5 331.5 68z"),
169
+ joomla:a(14,14,null,"M1198 1073l-160 160-151 152-30 30q-65 64-151.5 87t-171.5 2q-16 70-72 115t-129 45q-85 0-145-60.5t-60-145.5q0-72 44.5-128t113.5-72q-22-86 1-173t88-152l12-12 151 152-11 11q-37 37-37 89t37 90q37 37 89 37t89-37l30-30 151-152 161-160zm-341-682l12 12-152 152-12-12q-37-37-89-37t-89 37-37 89.5 37 89.5l29 29 152 152 160 160-151 152-161-160-151-152-30-30q-68-67-90-159.5t5-179.5q-70-15-115-71t-45-129q0-85 60-145.5t145-60.5q76 0 133.5 49t69.5 123q84-20 169.5 3.5t149.5 87.5zm807 1067q0 85-60 145.5t-145 60.5q-74 0-131-47t-71-118q-86 28-179.5 6t-161.5-90l-11-12 151-152 12 12q37 37 89 37t89-37 37-89-37-89l-30-30-152-152-160-160 152-152 160 160 152 152 29 30q64 64 87.5 150.5t2.5 171.5q76 11 126.5 68.5t50.5 134.5zm-2-1124q0 77-51 135t-127 69q26 85 3 176.5t-90 158.5l-12 12-151-152 12-12q37-37 37-89t-37-89-89-37-89 37l-30 30-152 152-160 160-152-152 161-160 152-152 29-30q67-67 159-89.5t178 3.5q11-75 68.5-126t135.5-51q85 0 145 60.5t60 145.5z"),
170
+ drupal:a(14,14,null,"M1295 1586q-5-19-24-5-30 22-87 39t-131 17q-129 0-193-49-5-4-13-4-11 0-26 12-7 6-7.5 16t7.5 20q34 32 87.5 46t102.5 12.5 99-4.5q41-4 84.5-20.5t65-30 28.5-20.5q12-12 7-29zm-39-115q-19-47-39-61-23-15-76-15-47 0-71 10-29 12-78 56-26 24-12 44 9 8 17.5 4.5t31.5-23.5q3-2 10.5-8.5t10.5-8.5 10-7 11.5-7 12.5-5 15-4.5 16.5-2.5 20.5-1q27 0 44.5 7.5t23 14.5 13.5 22q10 17 12.5 20t12.5-1q23-12 14-34zm355-281q0-22-5-44.5t-16.5-45-34-36.5-52.5-14q-33 0-97 41.5t-129 83.5-101 42q-27 1-63.5-19t-76-49-83.5-58-100-49-111-19q-115 1-197 78.5t-84 178.5q-2 112 74 164 29 20 62.5 28.5t103.5 8.5q57 0 132-32.5t134-71 120-70.5 93-31q26 1 65 31.5t71.5 67 68 67.5 55.5 32q35 3 58.5-14t55.5-63q28-41 42.5-101t14.5-106zm53-160q0 164-62 304.5t-166 236-242.5 149.5-290.5 54-293-57.5-247.5-157-170.5-241.5-64-302q0-89 19.5-172.5t49-145.5 70.5-118.5 78.5-94 78.5-69.5 64.5-46.5 42.5-24.5q14-8 51-26.5t54.5-28.5 48-30 60.5-44q36-28 58-72.5t30-125.5q129 155 186 193 44 29 130 68t129 66q21 13 39 25t60.5 46.5 76 70.5 75 95 69 122 47 148.5 19.5 177.5z"),
171
+ facebook:b(64,64,"0 0 100 100","23,85","M959 1524v-264h-157q-86 0 -116 -36t-30 -108v-189h293l-39 -296h-254v-759h-306v759h-255v296h255v218q0 186 104 288.5t277 102.5q147 0 228 -12z"),twitter:b(64,64,"0 0 100 100","9,80","M1620 1128q-67 -98 -162 -167q1 -14 1 -42q0 -130 -38 -259.5t-115.5 -248.5t-184.5 -210.5t-258 -146t-323 -54.5q-271 0 -496 145q35 -4 78 -4q225 0 401 138q-105 2 -188 64.5t-114 159.5q33 -5 61 -5q43 0 85 11q-112 23 -185.5 111.5t-73.5 205.5v4q68 -38 146 -41 q-66 44 -105 115t-39 154q0 88 44 163q121 -149 294.5 -238.5t371.5 -99.5q-8 38 -8 74q0 134 94.5 228.5t228.5 94.5q140 0 236 -102q109 21 205 78q-37 -115 -142 -178q93 10 186 50z"),
172
+ google:b(64,64,"0 0 125 125","5,95","M1437 623q0 -208 -87 -370.5t-248 -254t-369 -91.5q-149 0 -285 58t-234 156t-156 234t-58 285t58 285t156 234t234 156t285 58q286 0 491 -192l-199 -191q-117 113 -292 113q-123 0 -227.5 -62t-165.5 -168.5t-61 -232.5t61 -232.5t165.5 -168.5t227.5 -62 q83 0 152.5 23t114.5 57.5t78.5 78.5t49 83t21.5 74h-416v252h692q12 -63 12 -122zM2304 745v-210h-209v-209h-210v209h-209v210h209v209h210v-209h209z"),linkedin:b(64,64,"0 0 105 105","14,83","M349 911v-991h-330v991h330zM370 1217q1 -73 -50.5 -122t-135.5 -49h-2q-82 0 -132 49t-50 122q0 74 51.5 122.5t134.5 48.5t133 -48.5t51 -122.5zM1536 488v-568h-329v530q0 105 -40.5 164.5t-126.5 59.5q-63 0 -105.5 -34.5t-63.5 -85.5q-11 -30 -11 -81v-553h-329 q2 399 2 647t-1 296l-1 48h329v-144h-2q20 32 41 56t56.5 52t87 43.5t114.5 15.5q171 0 275 -113.5t104 -332.5z"),
173
+ tumblr:b(64,64,"0 0 100 100","22,85","M944 207l80 -237q-23 -35 -111 -66t-177 -32q-104 -2 -190.5 26t-142.5 74t-95 106t-55.5 120t-16.5 118v544h-168v215q72 26 129 69.5t91 90t58 102t34 99t15 88.5q1 5 4.5 8.5t7.5 3.5h244v-424h333v-252h-334v-518q0 -30 6.5 -56t22.5 -52.5t49.5 -41.5t81.5 -14 q78 2 134 29z"),instagram:b(64,64,"0 0 105 105","14,84.5","M1362 110v648h-135q20 -63 20 -131q0 -126 -64 -232.5t-174 -168.5t-240 -62q-197 0 -337 135.5t-140 327.5q0 68 20 131h-141v-648q0 -26 17.5 -43.5t43.5 -17.5h1069q25 0 43 17.5t18 43.5zM1078 643q0 124 -90.5 211.5t-218.5 87.5q-127 0 -217.5 -87.5t-90.5 -211.5 t90.5 -211.5t217.5 -87.5q128 0 218.5 87.5t90.5 211.5zM1362 1003v165q0 28 -20 48.5t-49 20.5h-174q-29 0 -49 -20.5t-20 -48.5v-165q0 -29 20 -49t49 -20h174q29 0 49 20t20 49zM1536 1211v-1142q0 -81 -58 -139t-139 -58h-1142q-81 0 -139 58t-58 139v1142q0 81 58 139 t139 58h1142q81 0 139 -58t58 -139z"),
174
+ soundcloud:a(64,64,"#fff","M26.791,154.715c-0.067,0.478-0.411,0.81-0.833,0.81c-0.436,0-0.781-0.334-0.837-0.814l-1.527-11.399 l1.527-11.598c0.056-0.482,0.401-0.817,0.837-0.817c0.42,0,0.768,0.335,0.833,0.814l1.811,11.601L26.791,154.715z M39.128,161.653 c-0.071,0.496-0.429,0.843-0.866,0.843c-0.445,0-0.812-0.355-0.869-0.848l-2.053-18.338c0,0,2.053-18.749,2.053-18.754 c0.061-0.488,0.428-0.842,0.869-0.842c0.44,0,0.797,0.343,0.87,0.842l2.333,18.754L39.128,161.653z M51.378,165.435 c-0.057,0.687-0.584,1.202-1.225,1.202c-0.646,0-1.177-0.516-1.227-1.202l-1.841-22.117l1.841-22.859 c0.052-0.69,0.579-1.207,1.227-1.207c0.64,0,1.168,0.517,1.225,1.201l2.093,22.865L51.378,165.435z M63.373,165.619 c-0.054,0.785-0.657,1.379-1.4,1.379c-0.754,0-1.354-0.594-1.404-1.383l-1.735-22.299l1.735-21.206 c0.048-0.788,0.649-1.384,1.404-1.384c0.746,0,1.349,0.591,1.4,1.374l1.973,21.216L63.373,165.619z M75.374,165.626v-0.007 c-0.05,0.872-0.743,1.562-1.582,1.562c-0.842,0-1.536-0.687-1.579-1.558l-1.636-22.298l1.636-34.501 c0.041-0.876,0.736-1.566,1.579-1.566c0.838,0,1.532,0.69,1.582,1.566l1.848,34.501L75.374,165.626z M87.372,165.482 c-0.044,0.977-0.819,1.743-1.758,1.743c-0.947,0-1.719-0.767-1.757-1.734l-1.529-22.158c0,0,1.526-42.393,1.526-42.396 c0.042-0.976,0.814-1.741,1.761-1.741c0.939,0,1.712,0.764,1.758,1.741l1.726,42.396L87.372,165.482z M99.617,165.123v0.003 c-0.038,1.174-0.964,2.097-2.114,2.097c-1.151,0-2.08-0.923-2.112-2.091l-1.318-21.794l1.315-47.481 c0.031-1.181,0.962-2.104,2.115-2.104c1.148,0,2.079,0.926,2.114,2.104l1.481,47.482L99.617,165.123z M111.869,164.799v-0.017 c-0.032,1.384-1.114,2.462-2.471,2.462c-1.361,0-2.448-1.082-2.475-2.446l-1.104-21.45l1.104-44.58 c0.027-1.383,1.116-2.463,2.475-2.463c1.356,0,2.438,1.081,2.471,2.459l1.239,44.585L111.869,164.799z M124.383,164.359v-0.025 c-0.022,1.558-1.289,2.822-2.827,2.822c-1.542,0-2.809-1.265-2.829-2.799l-1.161-21l1.159-57.859 c0.023-1.557,1.29-2.822,2.832-2.822c1.539,0,2.806,1.266,2.827,2.817l1.26,57.864L124.383,164.359z M206.723,167.344 c-0.458,0-71.129-0.035-71.194-0.044c-1.534-0.154-2.753-1.464-2.773-3.035V82.747c0.019-1.498,0.535-2.271,2.474-3.021 c4.986-1.928,10.635-3.069,16.43-3.069c23.678,0,43.09,18.16,45.133,41.306c3.057-1.282,6.415-1.994,9.936-1.994 c14.183,0,25.681,11.502,25.681,25.688C232.406,155.845,220.906,167.344,206.723,167.344z",
175
+ "0 0 256 256"),vkontakte:b(64,64,"0 0 110 110","7,82","M1917 1016q23 -64 -150 -294q-24 -32 -65 -85q-78 -100 -90 -131q-17 -41 14 -81q17 -21 81 -82h1l1 -1l1 -1l2 -2q141 -131 191 -221q3 -5 6.5 -12.5t7 -26.5t-0.5 -34t-25 -27.5t-59 -12.5l-256 -4q-24 -5 -56 5t-52 22l-20 12q-30 21 -70 64t-68.5 77.5t-61 58 t-56.5 15.5q-3 -1 -8 -3.5t-17 -14.5t-21.5 -29.5t-17 -52t-6.5 -77.5q0 -15 -3.5 -27.5t-7.5 -18.5l-4 -5q-18 -19 -53 -22h-115q-71 -4 -146 16.5t-131.5 53t-103 66t-70.5 57.5l-25 24q-10 10 -27.5 30t-71.5 91t-106 151t-122.5 211t-130.5 272q-6 16 -6 27t3 16l4 6 q15 19 57 19l274 2q12 -2 23 -6.5t16 -8.5l5 -3q16 -11 24 -32q20 -50 46 -103.5t41 -81.5l16 -29q29 -60 56 -104t48.5 -68.5t41.5 -38.5t34 -14t27 5q2 1 5 5t12 22t13.5 47t9.5 81t0 125q-2 40 -9 73t-14 46l-6 12q-25 34 -85 43q-13 2 5 24q17 19 38 30q53 26 239 24 q82 -1 135 -13q20 -5 33.5 -13.5t20.5 -24t10.5 -32t3.5 -45.5t-1 -55t-2.5 -70.5t-1.5 -82.5q0 -11 -1 -42t-0.5 -48t3.5 -40.5t11.5 -39t22.5 -24.5q8 -2 17 -4t26 11t38 34.5t52 67t68 107.5q60 104 107 225q4 10 10 17.5t11 10.5l4 3l5 2.5t13 3t20 0.5l288 2 q39 5 64 -2.5t31 -16.5z"),
176
+ odnoklassniki:b(64,64,"0 0 105 105","20,84","M640 629q-188 0 -321 133t-133 320q0 188 133 321t321 133t321 -133t133 -321q0 -187 -133 -320t-321 -133zM640 1306q-92 0 -157.5 -65.5t-65.5 -158.5q0 -92 65.5 -157.5t157.5 -65.5t157.5 65.5t65.5 157.5q0 93 -65.5 158.5t-157.5 65.5zM1163 574q13 -27 15 -49.5 t-4.5 -40.5t-26.5 -38.5t-42.5 -37t-61.5 -41.5q-115 -73 -315 -94l73 -72l267 -267q30 -31 30 -74t-30 -73l-12 -13q-31 -30 -74 -30t-74 30q-67 68 -267 268l-267 -268q-31 -30 -74 -30t-73 30l-12 13q-31 30 -31 73t31 74l267 267l72 72q-203 21 -317 94 q-39 25 -61.5 41.5t-42.5 37t-26.5 38.5t-4.5 40.5t15 49.5q10 20 28 35t42 22t56 -2t65 -35q5 -4 15 -11t43 -24.5t69 -30.5t92 -24t113 -11q91 0 174 25.5t120 50.5l38 25q33 26 65 35t56 2t42 -22t28 -35z"),
177
+ mailru:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="114" height="114" viewBox="0 0 114 114"><path fill="#fff" d="M41.93,30.296c-3.896,0-7.066,3.169-7.066,7.065s3.17,7.067,7.066,7.067s7.064-3.171,7.064-7.067 S45.825,30.296,41.93,30.296z"></path><path fill="#fff" d="M72.223,30.296c-3.896,0-7.065,3.169-7.065,7.065s3.17,7.067,7.065,7.067s7.064-3.171,7.064-7.067 S76.117,30.296,72.223,30.296z"></path><path fill="#fff" d="M96.324,77.49c0.299-1.112,0.146-2.273-0.428-3.271l-8.785-15.268c-0.769-1.332-2.199-2.16-3.738-2.16 c-0.75,0-1.492,0.199-2.146,0.576c-0.998,0.574-1.711,1.502-2.012,2.613c-0.299,1.111-0.146,2.272,0.428,3.271l0.703,1.226 l-0.342,0.494c-4.232,6.111-13.26,10.061-22.994,10.061c-9.67,0-18.668-3.911-22.926-9.965l-0.352-0.5l0.754-1.289 c1.199-2.049,0.507-4.694-1.543-5.896c-0.66-0.385-1.41-0.589-2.17-0.589c-1.528,0-2.955,0.816-3.725,2.133l-8.935,15.27 c-1.199,2.05-0.507,4.695,1.543,5.895c0.659,0.387,1.411,0.59,2.172,0.59c1.527,0,2.954-0.815,3.724-2.132l3.496-5.974l0.871,0.876 c6.447,6.481,16.32,10.2,27.09,10.2c10.778,0,20.658-3.725,27.104-10.215l0.879-0.885l3.436,5.969 c0.768,1.332,2.2,2.159,3.739,2.159c0.751,0,1.492-0.198,2.144-0.573C95.311,79.529,96.023,78.602,96.324,77.49z"></path></svg>',
178
+ icon:function(b,e,f){return a(e,e,f||"#666",c[b])}}}();var WPacTime=WPacTime||{getTime:function(a,b,c){return"chat"==c?this.getChatTime(a,b||"en"):c?this.getFormatTime(a,c,b||"en"):this.getDefaultTime(a,b||"en")},getChatTime:function(a,b){var c=((new Date).getTime()-a)/1E3/60/60,d=c/24;return 24>c?this.getFormatTime(a,"HH:mm",b):365>d?this.getFormatTime(a,"dd.MM HH:mm",b):this.getFormatTime(a,"yyyy.MM.dd HH:mm",b)},getDefaultTime:function(a,b){return this.getTimeAgo(a,b)},getTimeAgo:function(a,b){var c=((new Date).getTime()-a)/1E3,d=c/60,e=d/60,f=e/24,
179
+ g=f/365;b=WPacTime.Messages[b]?b:"en";return 45>c?WPacTime.Messages[b].second:90>c?WPacTime.Messages[b].minute:45>d?WPacTime.Messages[b].minutes(d):90>d?WPacTime.Messages[b].hour:24>e?WPacTime.Messages[b].hours(e):48>e?WPacTime.Messages[b].day:30>f?WPacTime.Messages[b].days(f):60>f?WPacTime.Messages[b].month:365>f?WPacTime.Messages[b].months(f):2>g?WPacTime.Messages[b].year:WPacTime.Messages[b].years(g)},getTime12:function(a,b){var c=new Date(a);return(c.getHours()%12?c.getHours()%12:12)+":"+c.getMinutes()+
180
+ (12<=c.getHours()?" PM":" AM")},getFormatTime:function(a,b,c){var d=new Date(a),e={SS:d.getMilliseconds(),ss:d.getSeconds(),mm:d.getMinutes(),HH:d.getHours(),hh:(d.getHours()%12?d.getHours()%12:12)+(12<=d.getHours()?"PM":"AM"),dd:d.getDate(),MM:d.getMonth()+1,yyyy:d.getFullYear(),yy:String(d.getFullYear()).toString().substr(2,2),ago:this.getTimeAgo(a,c),12:this.getTime12(a,c)};return b.replace(/(SS|ss|mm|HH|hh|DD|dd|MM|yyyy|yy|ago|12)/g,function(a,b){var c=e[b];return 10>c?"0"+c:c})},declineNum:function(a,
181
+ b,c,d){return a+" "+this.declineMsg(a,b,c,d)},declineMsg:function(a,b,c,d,e){var f=a%10;return 1==f&&(1==a||20<a)?b:1<f&&5>f&&(20<a||10>a)?c:a?d:e}};
182
+ WPacTime.Messages={ru:{second:"\u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e",minute:"\u043c\u0438\u043d\u0443\u0442\u0443 \u043d\u0430\u0437\u0430\u0434",minutes:function(a){return WPacTime.declineNum(Math.round(a),"\u043c\u0438\u043d\u0443\u0442\u0430 \u043d\u0430\u0437\u0430\u0434","\u043c\u0438\u043d\u0443\u0442\u044b \u043d\u0430\u0437\u0430\u0434","\u043c\u0438\u043d\u0443\u0442 \u043d\u0430\u0437\u0430\u0434")},hour:"\u0447\u0430\u0441 \u043d\u0430\u0437\u0430\u0434",hours:function(a){return WPacTime.declineNum(Math.round(a),
183
+ "\u0447\u0430\u0441 \u043d\u0430\u0437\u0430\u0434","\u0447\u0430\u0441\u0430 \u043d\u0430\u0437\u0430\u0434","\u0447\u0430\u0441\u043e\u0432 \u043d\u0430\u0437\u0430\u0434")},day:"\u0434\u0435\u043d\u044c \u043d\u0430\u0437\u0430\u0434",days:function(a){return WPacTime.declineNum(Math.round(a),"\u0434\u0435\u043d\u044c \u043d\u0430\u0437\u0430\u0434","\u0434\u043d\u044f \u043d\u0430\u0437\u0430\u0434","\u0434\u043d\u0435\u0439 \u043d\u0430\u0437\u0430\u0434")},month:"\u043c\u0435\u0441\u044f\u0446 \u043d\u0430\u0437\u0430\u0434",
184
+ months:function(a){return WPacTime.declineNum(Math.round(a/30),"\u043c\u0435\u0441\u044f\u0446 \u043d\u0430\u0437\u0430\u0434","\u043c\u0435\u0441\u044f\u0446\u0430 \u043d\u0430\u0437\u0430\u0434","\u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u043d\u0430\u0437\u0430\u0434")},year:"\u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434",years:function(a){return WPacTime.declineNum(Math.round(a),"\u0433\u043e\u0434 \u043d\u0430\u0437\u0430\u0434","\u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434",
185
+ "\u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434")}},en:{second:"just now",minute:"1m ago",minutes:function(a){return Math.round(a)+"m ago"},hour:"1h ago",hours:function(a){return Math.round(a)+"h ago"},day:"day ago",days:function(a){return Math.round(a)+" days ago"},month:"month ago",months:function(a){return Math.round(a/30)+" months ago"},year:"year ago",years:function(a){return Math.round(a)+" years ago"}},uk:{second:"\u0442\u0456\u043b\u044c\u043a\u0438 \u0449\u043e",minute:"\u0445\u0432\u0438\u043b\u0438\u043d\u0443 \u0442\u043e\u043c\u0443",
186
+ minutes:function(a){return WPacTime.declineNum(Math.round(a),"\u0445\u0432\u0438\u043b\u0438\u043d\u0443 \u0442\u043e\u043c\u0443","\u0445\u0432\u0438\u043b\u0438\u043d\u0438 \u0442\u043e\u043c\u0443","\u0445\u0432\u0438\u043b\u0438\u043d \u0442\u043e\u043c\u0443")},hour:"\u0433\u043e\u0434\u0438\u043d\u0443 \u0442\u043e\u043c\u0443",hours:function(a){return WPacTime.declineNum(Math.round(a),"\u0433\u043e\u0434\u0438\u043d\u0443 \u0442\u043e\u043c\u0443","\u0433\u043e\u0434\u0438\u043d\u0438 \u0442\u043e\u043c\u0443",
187
+ "\u0433\u043e\u0434\u0438\u043d \u0442\u043e\u043c\u0443")},day:"\u0434\u0435\u043d\u044c \u0442\u043e\u043c\u0443",days:function(a){return WPacTime.declineNum(Math.round(a),"\u0434\u0435\u043d\u044c \u0442\u043e\u043c\u0443","\u0434\u043d\u0456 \u0442\u043e\u043c\u0443","\u0434\u043d\u0456\u0432 \u0442\u043e\u043c\u0443")},month:"\u043c\u0456\u0441\u044f\u0446\u044c \u0442\u043e\u043c\u0443",months:function(a){return WPacTime.declineNum(Math.round(a/30),"\u043c\u0456\u0441\u044f\u0446\u044c \u0442\u043e\u043c\u0443",
188
+ "\u043c\u0456\u0441\u044f\u0446\u0456 \u0442\u043e\u043c\u0443","\u043c\u0456\u0441\u044f\u0446\u0456\u0432 \u0442\u043e\u043c\u0443")},year:"\u0440\u0456\u043a \u0442\u043e\u043c\u0443",years:function(a){return WPacTime.declineNum(Math.round(a),"\u0440\u0456\u043a \u0442\u043e\u043c\u0443","\u0440\u043e\u043a\u0438 \u0442\u043e\u043c\u0443","\u0440\u043e\u043a\u0456\u0432 \u0442\u043e\u043c\u0443")}},ro:{second:"chiar acum",minute:"\u00een urm\u0103 minut",minutes:function(a){return WPacTime.declineNum(Math.round(a),
189
+ "o minuta in urma","minute in urma","de minute in urma")},hour:"acum o ora",hours:function(a){return WPacTime.declineNum(Math.round(a),"acum o ora","ore in urma","de ore in urma")},day:"o zi in urma",days:function(a){return WPacTime.declineNum(Math.round(a),"o zi in urma","zile in urma","de zile in urma")},month:"o luna in urma",months:function(a){return WPacTime.declineNum(Math.round(a/30),"o luna in urma","luni in urma","de luni in urma")},year:"un an in urma",years:function(a){return WPacTime.declineNum(Math.round(a),
190
+ "un an in urma","ani in urma","de ani in urma")}},lv:{second:"Maz\u0101k par min\u016bti",minute:"Pirms min\u016btes",minutes:function(a){return WPacTime.declineNum(Math.round(a),"pirms min\u016btes","pirms min\u016bt\u0113m","pirms min\u016bt\u0113m")},hour:"pirms stundas",hours:function(a){return WPacTime.declineNum(Math.round(a),"pirms stundas","pirms stund\u0101m","pirms stund\u0101m")},day:"pirms dienas",days:function(a){return WPacTime.declineNum(Math.round(a),"pirms dienas","pirms dien\u0101m",
191
+ "pirms dien\u0101m")},month:"pirms m\u0113ne\u0161a",months:function(a){return WPacTime.declineNum(Math.round(a/30),"pirms m\u0113ne\u0161a","pirms m\u0113ne\u0161iem","pirms m\u0113ne\u0161iem")},year:"pirms gada",years:function(a){return WPacTime.declineNum(Math.round(a),"pirms gada","pirms gadiem","pirms gadiem")}},lt:{second:"k\u0105 tik",minute:"prie\u0161 minut\u0119",minutes:function(a){return WPacTime.declineNum(Math.round(a),"minut\u0117 prie\u0161","minut\u0117s prie\u0161","minu\u010di\u0173 prie\u0161")},
192
+ hour:"prie\u0161 valand\u0105",hours:function(a){return WPacTime.declineNum(Math.round(a),"valanda prie\u0161","valandos prie\u0161","valand\u0173 prie\u0161")},day:"prie\u0161 dien\u0105",days:function(a){return WPacTime.declineNum(Math.round(a),"diena prie\u0161","dienos prie\u0161","dien\u0173 prie\u0161")},month:"prie\u0161 m\u0117nes\u012f",months:function(a){return WPacTime.declineNum(Math.round(a/30),"m\u0117nes\u012f prie\u0161","m\u0117nesiai prie\u0161","m\u0117nesi\u0173 prie\u0161")},
193
+ year:"prie\u0161 metus",years:function(a){return WPacTime.declineNum(Math.round(a),"metai prie\u0161","metai prie\u0161","met\u0173 prie\u0161")}},kk:{second:"\u0431\u0456\u0440 \u043c\u0438\u043d\u0443\u0442\u0442\u0430\u043d \u0430\u0437 \u0443\u0430\u049b\u044b\u0442 \u0431\u04b1\u0440\u044b\u043d",minute:"\u0431\u0456\u0440 \u043c\u0438\u043d\u0443\u0442 \u0431\u04b1\u0440\u044b\u043d",minutes:function(a){return WPacTime.declineNum(Math.round(a),"\u043c\u0438\u043d\u0443\u0442 \u0431\u04b1\u0440\u044b\u043d",
194
+ "\u043c\u0438\u043d\u0443\u0442 \u0431\u04b1\u0440\u044b\u043d","\u043c\u0438\u043d\u0443\u0442 \u0431\u04b1\u0440\u044b\u043d")},hour:"\u0431\u0456\u0440 \u0441\u0430\u0493\u0430\u0442 \u0431\u04b1\u0440\u044b\u043d",hours:function(a){return WPacTime.declineNum(Math.round(a),"\u0441\u0430\u0493\u0430\u0442 \u0431\u04b1\u0440\u044b\u043d","\u0441\u0430\u0493\u0430\u0442 \u0431\u04b1\u0440\u044b\u043d","\u0441\u0430\u0493\u0430\u0442 \u0431\u04b1\u0440\u044b\u043d")},day:"\u0431\u0456\u0440 \u043a\u04af\u043d \u0431\u04b1\u0440\u044b\u043d",
195
+ days:function(a){return WPacTime.declineNum(Math.round(a),"\u043a\u04af\u043d \u0431\u04b1\u0440\u044b\u043d","\u043a\u04af\u043d \u0431\u04b1\u0440\u044b\u043d","\u043a\u04af\u043d \u0431\u04b1\u0440\u044b\u043d")},month:"\u0431\u0456\u0440 \u0430\u0439 \u0431\u04b1\u0440\u044b\u043d",months:function(a){return WPacTime.declineNum(Math.round(a/30),"\u0430\u0439 \u0431\u04b1\u0440\u044b\u043d","\u0430\u0439 \u0431\u04b1\u0440\u044b\u043d","\u0430\u0439 \u0431\u04b1\u0440\u044b\u043d")},year:"\u0431\u0456\u0440 \u0436\u044b\u043b \u0431\u04b1\u0440\u044b\u043d",
196
+ years:function(a){return WPacTime.declineNum(Math.round(a),"\u0436\u044b\u043b \u0431\u04b1\u0440\u044b\u043d","\u0436\u044b\u043b \u0431\u04b1\u0440\u044b\u043d","\u0436\u044b\u043b \u0431\u04b1\u0440\u044b\u043d")}},ka:{second:"\u10ec\u10d0\u10db\u10d8\u10e1 \u10ec\u10d8\u10dc",minute:"\u10ec\u10e3\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc",minutes:function(a){return WPacTime.declineNum(Math.round(a),"\u10ec\u10e3\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10ec\u10e3\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc",
197
+ "\u10ec\u10e3\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc")},hour:"\u10e1\u10d0\u10d0\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc",hours:function(a){return WPacTime.declineNum(Math.round(a),"\u10e1\u10d0\u10d0\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10e1\u10d0\u10d0\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10e1\u10d0\u10d0\u10d7\u10d8\u10e1 \u10ec\u10d8\u10dc")},day:"\u10d3\u10e6\u10d8\u10e1 \u10ec\u10d8\u10dc",days:function(a){return WPacTime.declineNum(Math.round(a),"\u10d3\u10e6\u10d8\u10e1 \u10ec\u10d8\u10dc",
198
+ "\u10d3\u10e6\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10d3\u10e6\u10d8\u10e1 \u10ec\u10d8\u10dc")},month:"\u10d7\u10d5\u10d8\u10e1 \u10ec\u10d8\u10dc",months:function(a){return WPacTime.declineNum(Math.round(a/30),"\u10d7\u10d5\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10d7\u10d5\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10d7\u10d5\u10d8\u10e1 \u10ec\u10d8\u10dc")},year:"\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc",years:function(a){return WPacTime.declineNum(Math.round(a),"\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc",
199
+ "\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc","\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc")}},hy:{second:"\u0574\u056b \u0584\u0576\u056b \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576 \u0561\u057c\u0561\u057b",minute:"\u0574\u0565\u056f \u0580\u0578\u057a\u0565 \u0561\u057c\u0561\u057b",minutes:function(a){return WPacTime.declineNum(Math.round(a),"\u0580\u0578\u057a\u0565 \u0561\u057c\u0561\u057b","\u0580\u0578\u057a\u0565 \u0561\u057c\u0561\u057b","\u0580\u0578\u057a\u0565 \u0561\u057c\u0561\u057b")},
200
+ hour:"\u0574\u0565\u056f \u056a\u0561\u0574 \u0561\u057c\u0561\u057b",hours:function(a){return WPacTime.declineNum(Math.round(a),"\u056a\u0561\u0574 \u0561\u057c\u0561\u057b","\u056a\u0561\u0574 \u0561\u057c\u0561\u057b","\u056a\u0561\u0574 \u0561\u057c\u0561\u057b")},day:"\u0574\u0565\u056f \u0585\u0580 \u0561\u057c\u0561\u057b",days:function(a){return WPacTime.declineNum(Math.round(a),"\u0585\u0580 \u0561\u057c\u0561\u057b","\u0585\u0580 \u0561\u057c\u0561\u057b","\u0585\u0580 \u0561\u057c\u0561\u057b")},
201
+ month:"\u0574\u0565\u056f \u0561\u0574\u056b\u057d \u0561\u057c\u0561\u057b",months:function(a){return WPacTime.declineNum(Math.round(a/30),"\u0561\u0574\u056b\u057d \u0561\u057c\u0561\u057b","\u0561\u0574\u056b\u057d \u0561\u057c\u0561\u057b","\u0561\u0574\u056b\u057d \u0561\u057c\u0561\u057b")},year:"\u0574\u0565\u056f \u057f\u0561\u0580\u056b \u0561\u057c\u0561\u057b",years:function(a){return WPacTime.declineNum(Math.round(a),"\u057f\u0561\u0580\u056b \u0561\u057c\u0561\u057b","\u057f\u0561\u0580\u056b \u0561\u057c\u0561\u057b",
202
+ "\u057f\u0561\u0580\u056b \u0561\u057c\u0561\u057b")}},fr:{second:"tout \u00e0 l'heure",minute:"environ une minute",minutes:function(a){return Math.round(a)+" minutes"},hour:"environ une heure",hours:function(a){return"environ "+Math.round(a)+" heures"},day:"un jour",days:function(a){return Math.round(a)+" jours"},month:"environ un mois",months:function(a){return Math.round(a/30)+" mois"},year:"environ un an",years:function(a){return Math.round(a)+" ans"}},es:{second:"en este momento",minute:"hace un minuto",
203
+ minutes:function(a){return WPacTime.declineNum(Math.round(a),"hace un minuto","minutos atr\u00e1s","minutos atr\u00e1s")},hour:"una hora atr\u00e1s",hours:function(a){return WPacTime.declineNum(Math.round(a),"una hora atr\u00e1s","horas atr\u00e1s","horas atr\u00e1s")},day:"hace un d\u00eda",days:function(a){return WPacTime.declineNum(Math.round(a),"un d\u00eda atr\u00e1s","d\u00edas atr\u00e1s","d\u00edas atr\u00e1s")},month:"Hace un mes",months:function(a){return WPacTime.declineNum(Math.round(a/
204
+ 30),"un mes atr\u00e1s","meses atr\u00e1s","meses atr\u00e1s")},year:"Hace un a\u00f1o",years:function(a){return WPacTime.declineNum(Math.round(a),"hace un a\u00f1o","a\u00f1os atr\u00e1s","a\u00f1os atr\u00e1s")}},el:{second:"\u03bb\u03b9\u03b3\u03cc\u03c4\u03b5\u03c1\u03bf \u03b1\u03c0\u03cc \u03ad\u03bd\u03b1 \u03bb\u03b5\u03c0\u03c4\u03cc",minute:"\u03b3\u03cd\u03c1\u03c9 \u03c3\u03c4\u03bf \u03ad\u03bd\u03b1 \u03bb\u03b5\u03c0\u03c4\u03cc",minutes:function(a){return Math.round(a)+" minutes"},
205
+ hour:"\u03b3\u03cd\u03c1\u03c9 \u03c3\u03c4\u03b7\u03bd \u03bc\u03b9\u03b1 \u03ce\u03c1\u03b1",hours:function(a){return"about "+Math.round(a)+" hours"},day:"\u03bc\u03b9\u03b1 \u03bc\u03ad\u03c1\u03b1",days:function(a){return Math.round(a)+" days"},month:"\u03b3\u03cd\u03c1\u03c9 \u03c3\u03c4\u03bf\u03bd \u03ad\u03bd\u03b1 \u03bc\u03ae\u03bd\u03b1",months:function(a){return Math.round(a/30)+" months"},year:"\u03b3\u03cd\u03c1\u03c9 \u03c3\u03c4\u03bf\u03bd \u03ad\u03bd\u03b1 \u03c7\u03c1\u03cc\u03bd\u03bf",
206
+ years:function(a){return Math.round(a)+" years"}},de:{second:"soeben",minute:"vor einer Minute",minutes:function(a){return"vor "+Math.round(a)+" Minuten"},hour:"vor einer Stunde",hours:function(a){return"vor "+Math.round(a)+" Stunden"},day:"vor einem Tag",days:function(a){return"vor "+Math.round(a)+" Tagen"},month:"vor einem Monat",months:function(a){return"vor "+Math.round(a/30)+" Monaten"},year:"vor einem Jahr",years:function(a){return"vor "+Math.round(a)+" Jahren"}},be:{second:"\u043c\u0435\u043d\u0448 \u0437\u0430 \u0445\u0432\u0456\u043b\u0456\u043d\u0443 \u0442\u0430\u043c\u0443",
207
+ minute:"\u0445\u0432\u0456\u043b\u0456\u043d\u0443 \u0442\u0430\u043c\u0443",minutes:function(a){return WPacTime.declineNum(Math.round(a),"\u0445\u0432\u0456\u043b\u0456\u043d\u0430 \u0442\u0430\u043c\u0443","\u0445\u0432\u0456\u043b\u0456\u043d\u044b \u0442\u0430\u043c\u0443","\u0445\u0432\u0456\u043b\u0456\u043d \u0442\u0430\u043c\u0443")},hour:"\u0433\u0430\u0434\u0437\u0456\u043d\u0443 \u0442\u0430\u043c\u0443",hours:function(a){return WPacTime.declineNum(Math.round(a),"\u0433\u0430\u0434\u0437\u0456\u043d\u0443 \u0442\u0430\u043c\u0443",
208
+ "\u0433\u0430\u0434\u0437\u0456\u043d\u044b \u0442\u0430\u043c\u0443","\u0433\u0430\u0434\u0437\u0456\u043d \u0442\u0430\u043c\u0443")},day:"\u0434\u0437\u0435\u043d\u044c \u0442\u0430\u043c\u0443",days:function(a){return WPacTime.declineNum(Math.round(a),"\u0434\u0437\u0435\u043d\u044c \u0442\u0430\u043c\u0443","\u0434\u043d\u0456 \u0442\u0430\u043c\u0443","\u0434\u0437\u0451\u043d \u0442\u0430\u043c\u0443")},month:"\u043c\u0435\u0441\u044f\u0446 \u0442\u0430\u043c\u0443",months:function(a){return WPacTime.declineNum(Math.round(a/
209
+ 30),"\u043c\u0435\u0441\u044f\u0446 \u0442\u0430\u043c\u0443","\u043c\u0435\u0441\u044f\u0446\u0430 \u0442\u0430\u043c\u0443","\u043c\u0435\u0441\u044f\u0446\u0430\u045e \u0442\u0430\u043c\u0443")},year:"\u0433\u043e\u0434 \u0442\u0430\u043c\u0443",years:function(a){return WPacTime.declineNum(Math.round(a),"\u0433\u043e\u0434 \u0442\u0430\u043c\u0443","\u0433\u0430\u0434\u044b \u0442\u0430\u043c\u0443","\u0433\u043e\u0434 \u0442\u0430\u043c\u0443")}},it:{second:"proprio ora",minute:"un minuto fa",
210
+ minutes:function(a){return WPacTime.declineNum(Math.round(a),"un minuto fa","minuti fa","minuti fa")},hour:"un'ora fa",hours:function(a){return WPacTime.declineNum(Math.round(a),"un'ora fa","ore fa","ore fa")},day:"un giorno fa",days:function(a){return WPacTime.declineNum(Math.round(a),"un giorno fa","giorni fa","giorni fa")},month:"un mese fa",months:function(a){return WPacTime.declineNum(Math.round(a/30),"un mese fa","mesi fa","mesi fa")},year:"un anno fa",years:function(a){return WPacTime.declineNum(Math.round(a),
211
+ "un anno fa","anni fa","anni fa")}}};var WPacStars=WPacStars||{html:'<span class="wp-stars">{{~it.stars :c}}{{?it.rating >= c}}<span class="wp-star" data-origin="star" data-color="{{=it.color}}" data-star="{{=c}}" style="display:inline-block;vertical-align:middle;padding:0 4px 0 0;line-height:20px;cursor:pointer;">{{=it.svg.icon("star", it.size || 24, it.color)}}</span>{{??}}{{?c - it.rating < 1}}<span class="wp-star" data-origin="star_half" data-color="{{=it.color}}" data-star="{{=c}}" style="display:inline-block;vertical-align:middle;padding:0 4px 0 0;line-height:20px;cursor:pointer;">{{=it.svg.icon("star_half", it.size || 24, it.color)}}</span>{{??}}<span class="wp-star" data-origin="star_o" data-color="#ccc" data-star="{{=c}}" style="display:inline-block;vertical-align:middle;padding:0 4px 0 0;line-height:20px;cursor:pointer;">{{=it.svg.icon("star_o", it.size || 24, "#ccc")}}</span>{{?}}{{?}}{{~}}</span>',
212
+ main:function(a){var b=this,c=(a.cnt||document).querySelector(a.el);c.innerHTML=this.stars_render(a.size,a.color,a.stars,a.sum,a.count);if(!a.readonly){var c=c.querySelector(".wp-stars"),d=c.querySelectorAll(".wp-star");WPacFastjs.on(c,"mouseleave",function(a){WPacFastjs.each(d,function(a){var b=a.querySelector("path");a.setAttribute("data-hover","");b.setAttribute("d",WPacSVGIcon.path[a.getAttribute("data-origin")]);b.setAttribute("fill",a.getAttribute("data-color"))})});WPacFastjs.onall(d,"mouseout",
213
+ function(){b.prevHover(a,this);b.nextHover(a,this)});WPacFastjs.onall(d,"click",function(){var c=parseInt(this.getAttribute("data-star"));a.clickable&&(this.parentNode.setAttribute("data-star",c),WPacFastjs.each(d,function(d){d.getAttribute("data-star")<=c?(d.setAttribute("data-origin","star"),d.setAttribute("data-color",b.color(a.color))):(d.setAttribute("data-origin","star_o"),d.setAttribute("data-color","#ccc"))}));a.cb&&a.cb(c)})}},stars_render:function(a,b,c,d,e){return this.render("html",{size:a,
214
+ color:this.color(b),stars:this.stars(c||5),rating:this.rating(d,e)})},rating_render:function(a,b,c,d){return this.render("html",{size:b,color:this.color(c),stars:this.stars(d||5),rating:a})},color:function(a){return a?a.match(/^#[0-9a-zA-Z]+$/)?a:"#"+a:"#ff9800"},render:function(a,b){b.svg=WPacSVGIcon;return doT.template(this[a]||a)(b)},stars:function(a){for(var b=[],c=1;c<=a;c++)b.push(c);return b},rating:function(a,b){b=b||0;return 0<b?((a||0)/b).toFixed(1):0},prevHover:function(a,b){if(b){var c=
215
+ b.getAttribute("data-hover");c&&"off"!=c||(c=b.querySelector("path"),c.setAttribute("d",WPacSVGIcon.path.star),c.setAttribute("fill",this.color(a.color)),b.setAttribute("data-hover","on"));this.prevHover(a,WPacFastjs.prev(b))}},nextHover:function(a,b){var c=WPacFastjs.next(b);if(c){var d=c.getAttribute("data-hover");d&&"on"!=d||(d=c.querySelector("path"),d.setAttribute("d",WPacSVGIcon.path.star_o),d.setAttribute("fill","#ccc"),c.setAttribute("data-hover","off"));this.nextHover(a,c)}}};
nbproject/private/private.properties ADDED
@@ -0,0 +1,2 @@
 
 
1
+ index.file=index.php
2
+ url=http://localhost/accesspress-social-counter/
nbproject/private/private.xml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project-private xmlns="http://www.netbeans.org/ns/project-private/1">
3
+ <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
4
+ <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
5
+ <group/>
6
+ </open-files>
7
+ </project-private>
nbproject/project.properties ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ include.path=${php.global.include.path}
2
+ php.version=PHP_70
3
+ source.encoding=UTF-8
4
+ src.dir=.
5
+ tags.asp=false
6
+ tags.short=false
7
+ web.root=.
nbproject/project.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project xmlns="http://www.netbeans.org/ns/project/1">
3
+ <type>org.netbeans.modules.php.project</type>
4
+ <configuration>
5
+ <data xmlns="http://www.netbeans.org/ns/php-project/1">
6
+ <name>accesspress-social-counter</name>
7
+ </data>
8
+ </configuration>
9
+ </project>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: social count, social counter, social counters, social media counters, soci
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 4.5
6
  Tested up to: 5.0
7
- Stable tag: 1.7.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -16,13 +16,13 @@ A plugin to display your social accounts fans, subscribers and followers number
16
  <strong>AccessPress Social Counter</strong> is a <strong>Free WordPress plugin</strong> to display your social accounts fans, subscribers and followers number on your website!
17
  A perfect plugin to show your social media stats and encourage more to join your network.
18
 
19
- You can select the social media profiles you want to activate, enter details of your social media and select one of the designs from beautifully designed 5 design themes.
20
 
21
  All you have to do is either use a widget or shortcode to display your social media counter right on your website in your chosen location!
22
 
23
- The available social media in FREE version are: Facebook, Twitter, Google+, Instagram, Youtube, Sound Cloud and Dribbble along with Posts and Comments count.
24
 
25
- Just get it done in a few minutes!
26
 
27
  `For more social media integration, more design options, floating sidebar
28
  options,social sharing options, pinterest sharing options and more
@@ -43,12 +43,12 @@ Note: If Instagram followers count is returning 0, it is due to change in the in
43
  * <strong>User friendly and very interactive user interface</strong>
44
  - Anyone can use it, its as easy as drag and drop.
45
  * <strong>Upgrades available</strong>
46
- - For more features like more social media profiles, more design themes, your own design etc. - upgrade to Pro.
47
  * <strong>Support</strong>
48
  - Dedicated email, forum support
49
  * <strong>Free updates</strong>
50
  - Get free updates for lifetime.
51
-
52
  [youtube https://www.youtube.com/watch?v=96E67Z6AKM8]
53
 
54
  = Premium Features: =
@@ -70,15 +70,15 @@ Note: If Instagram followers count is returning 0, it is due to change in the in
70
 
71
  ★ Popup sharing and many more...
72
 
73
- = Premium Upgrade =
74
  * For premium upgrade, please go [here](https://accesspressthemes.com/wordpress-plugins/accesspress-social-pro/)
75
 
76
- = Available Languages =
77
  * English
78
  * Serbo-Croatian
79
  * Belarussian
80
 
81
- = Translators =
82
  * Serbo-Croatian - Borisa Djuraskovic ( http://www.webhostinghub.com )
83
  * Belarussian - UStarCash ( https://www.ustarcash.com )
84
 
@@ -87,7 +87,7 @@ Note: If Instagram followers count is returning 0, it is due to change in the in
87
  * <strong>Support Forum Link</strong>: http://accesspressthemes.com/support/
88
  * <strong>Website Link</strong>: http://accesspressthemes.com/
89
  * <strong>Youtube channel link</strong>: https://www.youtube.com/watch?v=TjZNcVG3fDE
90
- * <strong>Facebook link</strong>: https://www.facebook.com/AccessPressThemes
91
 
92
 
93
 
@@ -110,9 +110,9 @@ AND IF THIS PLUGIN HAS IMPRESSED YOU, THEN YOU WOULD ENJOY OUR OTHER PROJECTS TO
110
 
111
  [WPAll Club](https://wpall.club/) - A complete WordPress resources club. WordPress tutorials, blogs, curated free and premium themes and plugins, WordPress deals, offers, hosting info and more.
112
 
113
- [Premium WordPress Themes](https://themeforest.net/user/accesskeys/portfolio) - 6 premium WordPress themes well suited for all sort of websites. Professional, well coded and highly configurable themes for you.
114
 
115
- [Premium WordPress Plugins](https://codecanyon.net/user/accesskeys/portfolio) - 45+ premium WordPress plugins of many different types. High user ratings, great quality and best sellers in CodeCanyon marketplace.
116
 
117
  [AccessPress Themes](https://accesspressthemes.com/) - AccessPress Themes has 50+ beautiful and elegant, fully responsive, multipurpose themes to meet your need for free and commercial basis.
118
 
@@ -127,7 +127,7 @@ AND IF THIS PLUGIN HAS IMPRESSED YOU, THEN YOU WOULD ENJOY OUR OTHER PROJECTS TO
127
 
128
  == Frequently Asked Questions ==
129
  = What does this plugin do? =
130
- This plugin provides the ability to to display your social accounts fans, subscribers and followers number on your website along with the links to your social profile sites.
131
 
132
  = Will it effect my site's speed? =
133
  No , because we have provided the caching option to store the count in the database and update within certain period kept in the plugin cache settings section.
@@ -148,51 +148,55 @@ Once you install the plugin , you can check some general documentation about how
148
  5. Backend Cache Settings Section
149
 
150
  == Changelog ==
 
 
 
 
151
  = 1.7.7 =
152
  * WordPress 5.0 compatibility check
153
 
154
- = 1.7.4 =
155
  * Update in Facebook API
156
 
157
  = 1.7.3 =
158
  * Changed field type for cache settings from text to number
159
 
160
- = 1.7.2 =
161
  * Removed notice for Youtube counter
162
  * Compatibility check for version 4.8
163
 
164
  = 1.7.1 =
165
  * Done the bug fixings for the facebook followers counter.
166
 
167
- = 1.7.0 =
168
  * Updated google Plus setup description
169
 
170
- = 1.6.9 =
171
- * Updated file_get_contents with wp_remote_get for FQL
172
 
173
- = 1.6.8 =
174
  * Done small change in backend checkbox label layout
175
 
176
- = 1.6.7 =
177
- * Removed fontawesome CDN and enqueued locally as per WordPress Plugin Guidlines
178
 
179
- = 1.6.6 =
180
  * Updated documentation URL
181
 
182
- = 1.6.5 =
183
  * Removed session from backend
184
 
185
- = 1.6.4 =
186
- * Updated Documentation link in how to use section
187
 
188
- = 1.6.3 =
189
  * Changed backend settings tabs layout
190
  * Added More WordPress Resources link
191
 
192
  = 1.6.2 =
193
  * Fixed the facebook counter issue for the wordpress version 4.6.
194
 
195
- = 1.6.1 =
196
  * Updated backend notes to dismissible notices
197
  * Added below hooks on all the social network anchor links
198
  - apsc_facebook_link
@@ -204,12 +208,12 @@ Once you install the plugin , you can check some general documentation about how
204
  - apsc_dribbble_link
205
  - apsc_posts_link
206
  - apsc_comments_link
207
-
208
- = 1.6.0 =
209
  * Added tutuorial video in how to use section.
210
 
211
- = 1.5.9 =
212
- * Added Belarussian Language
213
 
214
  = 1.5.8 =
215
  * Fixed the Facebook followers count issue for Facebook APP API version 2.5 and above.
@@ -217,142 +221,142 @@ Once you install the plugin , you can check some general documentation about how
217
  = 1.5.7 =
218
  * Fixed the instagram followers count issues.
219
 
220
- = 1.5.6 =
221
- * Updated about section
222
 
223
- = 1.5.5 =
224
  * Updated layout of backend message
225
 
226
- = 1.5.4 =
227
  * Changed link for facebook and google to https
228
- * Updated heading notes layout in settings page
229
 
230
- = 1.5.3 =
231
- * Updated google API key generation procedure
232
 
233
- = 1.5.2 =
234
- * Updated FB API to work with new graph API
235
 
236
- = 1.5.1 =
237
  * Updated language file
238
 
239
- = 1.5.0 =
240
- * Done some modifications for WordPress 4.4 compatibility
241
 
242
- = 1.4.9 =
243
- * Done some css refining for theme 1
244
 
245
- = 1.4.8 =
246
  * Fixed file missing bug for system status
247
 
248
- = 1.4.7 =
249
- * Added system status tab
250
 
251
- = 1.4.6 =
252
- * Added some css to resolve the conflict
253
 
254
- = 1.4.5 =
255
- * Updated how to use section
256
 
257
- = 1.4.4 =
258
- * Updated backend notes layout
259
 
260
- = 1.4.3 =
261
- * Updated text domain to match the plugin's slug
262
 
263
- = 1.4.2 =
264
  * Fixed small bug regarding new added option
265
 
266
- = 1.4.1 =
267
- * Added font and frontend css disabling option
268
 
269
- = 1.4.0 =
270
- * Updated help note for youtube
271
 
272
- = 1.3.9 =
273
  * Fixed youtube count to be fetched automatically using API v3
274
  * Code cleanup done for shortcode
275
- * Fixed small bug for facebook count on API limit reach
276
 
277
- = 1.3.8 =
278
- * Updated demo link
279
 
280
- = 1.3.7 =
281
  * Escaped the output to prevent XSS vulnerability on social profile section
282
 
283
 
284
- = 1.3.6 =
285
  * Updated note in social profiles section
286
- * Updated rating link in settings header
287
 
288
- = 1.3.5 =
289
  * Removed font awesome dependency from frontend.css
290
  * Fixed some css conflicts for anchor links color and hover color
291
- * Added font awesome from CDN and removed the local file inclusion
292
  * Updated notes in how to use section
293
 
294
- = 1.3.4 =
295
- * Added count="coma/short/default" parameter for count only shortcode
296
 
297
- = 1.3.3 =
298
- * Fixed small bug regarding youtube count
299
 
300
- = 1.3.2 =
301
  * Updated youtube note for subscribers count
302
 
303
- = 1.3.1 =
304
  * Added Facebook Default Count field for fallback count to show when API is not available
305
  * Changed note for facebook user ID
306
- * Fixed small bug regarding the individual social media count shortcode cache period
307
 
308
- = 1.3.0 =
309
- * Added Shortcode [aps-get-count social_media="name of social media"] to get the individual social media count only
310
 
311
- = 1.2.0 =
312
- * Updated Facebook API
313
  * Added Youtube Subscribers field for mannual count
314
 
315
- = 1.1.9 =
316
  * Added some missed text domain
317
 
318
- = 1.1.8 =
319
  * Updated language file
320
 
321
- = 1.1.7 =
322
  * Fixed small issue for count format
323
 
324
- = 1.1.6 =
325
  * Updated some css for theme 5
326
 
327
- = 1.1.5 =
328
  * Updated some css for theme 4
329
 
330
- = 1.1.4 =
331
- * Updated some css for theme 2
332
 
333
- = 1.1.3 =
334
- * Updated some css for theme 1
335
 
336
- = 1.1.2 =
337
  * Updated some css for theme 3 for uniform width for all icons
338
 
339
- = 1.1.1 =
340
  * Added Serbo-Croatian Language
341
 
342
- = 1.1.0 =
343
- * Fixed the widget ID conflict
344
  * Updated Facebook Counter Description in backend
345
 
346
- = 1.0.9 =
347
  * Fixed some mismatched text domain
348
 
349
- = 1.0.8 =
350
- * Fixed the issue of opening the posts and comments links opening in new link for firefox and IE
351
 
352
- = 1.0.7 =
353
  * Added Counter Format Option
354
 
355
- = 1.0.6 =
356
  * Done few changes in backend social profiles
357
 
358
  = 1.0.5 =
@@ -361,15 +365,15 @@ Once you install the plugin , you can check some general documentation about how
361
  = 1.0.4 =
362
  * Added Upgrade Side banner
363
 
364
- = 1.0.3 =
365
  * Added Theme Selection Feature in widget
366
 
367
- = 1.0.2 =
368
- * Done number formatting for counts
369
 
370
  = 1.0.1 =
371
  * Done some fixes for mobile version
372
-
373
  = 1.0.0 =
374
  * Plugin submitted to http://wordpress.org for review and approval
375
  * Plugin approved in http://wordpress.org and comitted in plugin repository
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 4.5
6
  Tested up to: 5.0
7
+ Stable tag: 1.7.8
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
16
  <strong>AccessPress Social Counter</strong> is a <strong>Free WordPress plugin</strong> to display your social accounts fans, subscribers and followers number on your website!
17
  A perfect plugin to show your social media stats and encourage more to join your network.
18
 
19
+ You can select the social media profiles you want to activate, enter details of your social media and select one of the designs from beautifully designed 5 design themes.
20
 
21
  All you have to do is either use a widget or shortcode to display your social media counter right on your website in your chosen location!
22
 
23
+ The available social media in FREE version are: Facebook, Twitter, Google+, Instagram, Youtube, Sound Cloud and Dribbble along with Posts and Comments count.
24
 
25
+ Just get it done in a few minutes!
26
 
27
  `For more social media integration, more design options, floating sidebar
28
  options,social sharing options, pinterest sharing options and more
43
  * <strong>User friendly and very interactive user interface</strong>
44
  - Anyone can use it, its as easy as drag and drop.
45
  * <strong>Upgrades available</strong>
46
+ - For more features like more social media profiles, more design themes, your own design etc. - upgrade to Pro.
47
  * <strong>Support</strong>
48
  - Dedicated email, forum support
49
  * <strong>Free updates</strong>
50
  - Get free updates for lifetime.
51
+
52
  [youtube https://www.youtube.com/watch?v=96E67Z6AKM8]
53
 
54
  = Premium Features: =
70
 
71
  ★ Popup sharing and many more...
72
 
73
+ = Premium Upgrade =
74
  * For premium upgrade, please go [here](https://accesspressthemes.com/wordpress-plugins/accesspress-social-pro/)
75
 
76
+ = Available Languages =
77
  * English
78
  * Serbo-Croatian
79
  * Belarussian
80
 
81
+ = Translators =
82
  * Serbo-Croatian - Borisa Djuraskovic ( http://www.webhostinghub.com )
83
  * Belarussian - UStarCash ( https://www.ustarcash.com )
84
 
87
  * <strong>Support Forum Link</strong>: http://accesspressthemes.com/support/
88
  * <strong>Website Link</strong>: http://accesspressthemes.com/
89
  * <strong>Youtube channel link</strong>: https://www.youtube.com/watch?v=TjZNcVG3fDE
90
+ * <strong>Facebook link</strong>: https://www.facebook.com/AccessPressThemes
91
 
92
 
93
 
110
 
111
  [WPAll Club](https://wpall.club/) - A complete WordPress resources club. WordPress tutorials, blogs, curated free and premium themes and plugins, WordPress deals, offers, hosting info and more.
112
 
113
+ [Premium WordPress Themes](https://themeforest.net/user/accesskeys/portfolio) - 6 premium WordPress themes well suited for all sort of websites. Professional, well coded and highly configurable themes for you.
114
 
115
+ [Premium WordPress Plugins](https://codecanyon.net/user/accesskeys/portfolio) - 45+ premium WordPress plugins of many different types. High user ratings, great quality and best sellers in CodeCanyon marketplace.
116
 
117
  [AccessPress Themes](https://accesspressthemes.com/) - AccessPress Themes has 50+ beautiful and elegant, fully responsive, multipurpose themes to meet your need for free and commercial basis.
118
 
127
 
128
  == Frequently Asked Questions ==
129
  = What does this plugin do? =
130
+ This plugin provides the ability to to display your social accounts fans, subscribers and followers number on your website along with the links to your social profile sites.
131
 
132
  = Will it effect my site's speed? =
133
  No , because we have provided the caching option to store the count in the database and update within certain period kept in the plugin cache settings section.
148
  5. Backend Cache Settings Section
149
 
150
  == Changelog ==
151
+ =1.7.8 =
152
+ * Addition of third party API to extract Facebook count
153
+ * Addition of default count values for all the available networks
154
+
155
  = 1.7.7 =
156
  * WordPress 5.0 compatibility check
157
 
158
+ = 1.7.4 =
159
  * Update in Facebook API
160
 
161
  = 1.7.3 =
162
  * Changed field type for cache settings from text to number
163
 
164
+ = 1.7.2 =
165
  * Removed notice for Youtube counter
166
  * Compatibility check for version 4.8
167
 
168
  = 1.7.1 =
169
  * Done the bug fixings for the facebook followers counter.
170
 
171
+ = 1.7.0 =
172
  * Updated google Plus setup description
173
 
174
+ = 1.6.9 =
175
+ * Updated file_get_contents with wp_remote_get for FQL
176
 
177
+ = 1.6.8 =
178
  * Done small change in backend checkbox label layout
179
 
180
+ = 1.6.7 =
181
+ * Removed fontawesome CDN and enqueued locally as per WordPress Plugin Guidlines
182
 
183
+ = 1.6.6 =
184
  * Updated documentation URL
185
 
186
+ = 1.6.5 =
187
  * Removed session from backend
188
 
189
+ = 1.6.4 =
190
+ * Updated Documentation link in how to use section
191
 
192
+ = 1.6.3 =
193
  * Changed backend settings tabs layout
194
  * Added More WordPress Resources link
195
 
196
  = 1.6.2 =
197
  * Fixed the facebook counter issue for the wordpress version 4.6.
198
 
199
+ = 1.6.1 =
200
  * Updated backend notes to dismissible notices
201
  * Added below hooks on all the social network anchor links
202
  - apsc_facebook_link
208
  - apsc_dribbble_link
209
  - apsc_posts_link
210
  - apsc_comments_link
211
+
212
+ = 1.6.0 =
213
  * Added tutuorial video in how to use section.
214
 
215
+ = 1.5.9 =
216
+ * Added Belarussian Language
217
 
218
  = 1.5.8 =
219
  * Fixed the Facebook followers count issue for Facebook APP API version 2.5 and above.
221
  = 1.5.7 =
222
  * Fixed the instagram followers count issues.
223
 
224
+ = 1.5.6 =
225
+ * Updated about section
226
 
227
+ = 1.5.5 =
228
  * Updated layout of backend message
229
 
230
+ = 1.5.4 =
231
  * Changed link for facebook and google to https
232
+ * Updated heading notes layout in settings page
233
 
234
+ = 1.5.3 =
235
+ * Updated google API key generation procedure
236
 
237
+ = 1.5.2 =
238
+ * Updated FB API to work with new graph API
239
 
240
+ = 1.5.1 =
241
  * Updated language file
242
 
243
+ = 1.5.0 =
244
+ * Done some modifications for WordPress 4.4 compatibility
245
 
246
+ = 1.4.9 =
247
+ * Done some css refining for theme 1
248
 
249
+ = 1.4.8 =
250
  * Fixed file missing bug for system status
251
 
252
+ = 1.4.7 =
253
+ * Added system status tab
254
 
255
+ = 1.4.6 =
256
+ * Added some css to resolve the conflict
257
 
258
+ = 1.4.5 =
259
+ * Updated how to use section
260
 
261
+ = 1.4.4 =
262
+ * Updated backend notes layout
263
 
264
+ = 1.4.3 =
265
+ * Updated text domain to match the plugin's slug
266
 
267
+ = 1.4.2 =
268
  * Fixed small bug regarding new added option
269
 
270
+ = 1.4.1 =
271
+ * Added font and frontend css disabling option
272
 
273
+ = 1.4.0 =
274
+ * Updated help note for youtube
275
 
276
+ = 1.3.9 =
277
  * Fixed youtube count to be fetched automatically using API v3
278
  * Code cleanup done for shortcode
279
+ * Fixed small bug for facebook count on API limit reach
280
 
281
+ = 1.3.8 =
282
+ * Updated demo link
283
 
284
+ = 1.3.7 =
285
  * Escaped the output to prevent XSS vulnerability on social profile section
286
 
287
 
288
+ = 1.3.6 =
289
  * Updated note in social profiles section
290
+ * Updated rating link in settings header
291
 
292
+ = 1.3.5 =
293
  * Removed font awesome dependency from frontend.css
294
  * Fixed some css conflicts for anchor links color and hover color
295
+ * Added font awesome from CDN and removed the local file inclusion
296
  * Updated notes in how to use section
297
 
298
+ = 1.3.4 =
299
+ * Added count="coma/short/default" parameter for count only shortcode
300
 
301
+ = 1.3.3 =
302
+ * Fixed small bug regarding youtube count
303
 
304
+ = 1.3.2 =
305
  * Updated youtube note for subscribers count
306
 
307
+ = 1.3.1 =
308
  * Added Facebook Default Count field for fallback count to show when API is not available
309
  * Changed note for facebook user ID
310
+ * Fixed small bug regarding the individual social media count shortcode cache period
311
 
312
+ = 1.3.0 =
313
+ * Added Shortcode [aps-get-count social_media="name of social media"] to get the individual social media count only
314
 
315
+ = 1.2.0 =
316
+ * Updated Facebook API
317
  * Added Youtube Subscribers field for mannual count
318
 
319
+ = 1.1.9 =
320
  * Added some missed text domain
321
 
322
+ = 1.1.8 =
323
  * Updated language file
324
 
325
+ = 1.1.7 =
326
  * Fixed small issue for count format
327
 
328
+ = 1.1.6 =
329
  * Updated some css for theme 5
330
 
331
+ = 1.1.5 =
332
  * Updated some css for theme 4
333
 
334
+ = 1.1.4 =
335
+ * Updated some css for theme 2
336
 
337
+ = 1.1.3 =
338
+ * Updated some css for theme 1
339
 
340
+ = 1.1.2 =
341
  * Updated some css for theme 3 for uniform width for all icons
342
 
343
+ = 1.1.1 =
344
  * Added Serbo-Croatian Language
345
 
346
+ = 1.1.0 =
347
+ * Fixed the widget ID conflict
348
  * Updated Facebook Counter Description in backend
349
 
350
+ = 1.0.9 =
351
  * Fixed some mismatched text domain
352
 
353
+ = 1.0.8 =
354
+ * Fixed the issue of opening the posts and comments links opening in new link for firefox and IE
355
 
356
+ = 1.0.7 =
357
  * Added Counter Format Option
358
 
359
+ = 1.0.6 =
360
  * Done few changes in backend social profiles
361
 
362
  = 1.0.5 =
365
  = 1.0.4 =
366
  * Added Upgrade Side banner
367
 
368
+ = 1.0.3 =
369
  * Added Theme Selection Feature in widget
370
 
371
+ = 1.0.2 =
372
+ * Done number formatting for counts
373
 
374
  = 1.0.1 =
375
  * Done some fixes for mobile version
376
+
377
  = 1.0.0 =
378
  * Plugin submitted to http://wordpress.org for review and approval
379
  * Plugin approved in http://wordpress.org and comitted in plugin repository