Social Counter for WordPress – AccessPress Social Counter - Version 1.4.7

Version Description

  • Added system status tab
Download this release

Release Info

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

Code changes from version 1.4.6 to 1.4.7

accesspress-social-counter.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: AccessPress Social Counter
4
  * Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-counter/
5
  * Description: A plugin to display your social accounts fans, subscribers and followers number on your website with handful of backend settings and interface.
6
- * Version: 1.4.6
7
  * Author: AccessPress Themes
8
  * Author URI: http://accesspressthemes.com
9
  * Text Domain: aps-counter
@@ -24,7 +24,7 @@ if (!defined('SC_CSS_DIR')) {
24
  define('SC_CSS_DIR', plugin_dir_url(__FILE__) . 'css');
25
  }
26
  if (!defined('SC_VERSION')) {
27
- define('SC_VERSION', '1.4.6');
28
  }
29
  /**
30
  * Register of widgets
@@ -486,7 +486,7 @@ if (!class_exists('SC_Class')) {
486
  case 'youtube':
487
  $social_profile_url = esc_url($apsc_settings['social_profile']['youtube']['channel_url']);
488
  $count = get_transient('apsc_youtube');
489
-
490
  if(false === $count){
491
  $count = $apsc_settings['social_profile']['youtube']['subscribers_count'];
492
  if(
@@ -499,6 +499,7 @@ if (!class_exists('SC_Class')) {
499
  $channel_id = $apsc_settings['social_profile']['youtube']['channel_id'];
500
  $api_url = 'https://www.googleapis.com/youtube/v3/channels?part=statistics&id='.$channel_id.'&key='.$api_key;
501
  $connection = wp_remote_get($api_url, array('timeout'=>60));
 
502
  if (!is_wp_error($connection)) {
503
  $response = json_decode($connection['body'], true);
504
  if (isset($response['items'][0]['statistics']['subscriberCount'])) {
3
  * Plugin Name: AccessPress Social Counter
4
  * Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-counter/
5
  * Description: A plugin to display your social accounts fans, subscribers and followers number on your website with handful of backend settings and interface.
6
+ * Version: 1.4.7
7
  * Author: AccessPress Themes
8
  * Author URI: http://accesspressthemes.com
9
  * Text Domain: aps-counter
24
  define('SC_CSS_DIR', plugin_dir_url(__FILE__) . 'css');
25
  }
26
  if (!defined('SC_VERSION')) {
27
+ define('SC_VERSION', '1.4.7');
28
  }
29
  /**
30
  * Register of widgets
486
  case 'youtube':
487
  $social_profile_url = esc_url($apsc_settings['social_profile']['youtube']['channel_url']);
488
  $count = get_transient('apsc_youtube');
489
+
490
  if(false === $count){
491
  $count = $apsc_settings['social_profile']['youtube']['subscribers_count'];
492
  if(
499
  $channel_id = $apsc_settings['social_profile']['youtube']['channel_id'];
500
  $api_url = 'https://www.googleapis.com/youtube/v3/channels?part=statistics&id='.$channel_id.'&key='.$api_key;
501
  $connection = wp_remote_get($api_url, array('timeout'=>60));
502
+
503
  if (!is_wp_error($connection)) {
504
  $response = json_decode($connection['body'], true);
505
  if (isset($response['items'][0]['statistics']['subscriberCount'])) {
inc/backend/boards/system-status.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="apsc-boards-tabs" id="apsc-board-system-status" style="display:none">
2
+ <div class="apsc-tab-wrapper">
3
+ <div class="apsc-option-inner-wrapper">
4
+ <label>fsockopen/cURL</label>
5
+ <div class="apsc-option-field">
6
+ <?php
7
+ if ( function_exists( 'fsockopen' ) || function_exists( 'curl_init' ) ) {
8
+ if ( function_exists( 'fsockopen' ) && function_exists( 'curl_init' ) ) {
9
+ _e( 'Your server has fsockopen and cURL enabled.', 'accesspress-social-counter' );
10
+ } elseif ( function_exists( 'fsockopen' ) ) {
11
+ _e( 'Your server has fsockopen enabled, cURL is disabled.', 'accesspress-social-counter' );
12
+ } else {
13
+ _e( 'Your server has cURL enabled, fsockopen is disabled.', 'accesspress-social-counter' );
14
+ }
15
+
16
+
17
+ }
18
+ ?>
19
+ </div>
20
+ </div>
21
+ <div class="apsc-option-inner-wrapper">
22
+ <label>WP Remote Get</label>
23
+ <div class="apsc-option-field">
24
+ <?php
25
+
26
+ $response = wp_remote_get( 'https://httpbin.org/ip', array( 'timeout' => 60 ) );
27
+
28
+ if ( ! is_wp_error( $response ) && $response['response']['code'] >= 200 && $response['response']['code'] < 300 ) {
29
+
30
+ _e( 'wp_remote_get() was successful.', 'accesspress-social-counter' );
31
+ } elseif ( is_wp_error( $response ) ) {
32
+ _e( 'wp_remote_get() failed. This plugin won\'t work with your server. Contact your hosting provider. Error:', 'accesspress-social-counter' ) . ' ' . $response->get_error_message();
33
+ }
34
+ ?>
35
+ </div>
36
+ </div>
37
+ <div class="apsc-extra-note"><?php _e('Note: The plugin will only work properly if fsockopen/cURL and wp_remote_get is working in your server.','accesspress-social-counter');?></div>
38
+ </div>
39
+ </div>
inc/backend/settings.php CHANGED
@@ -34,7 +34,7 @@ $apsc_settings = $this->apsc_settings;
34
 
35
  <div class="apsc-title"><?php _e('AccessPress Social Counter', 'accesspress-social-counter'); ?></div>
36
  </div>
37
- <div class="apsc-extra-note"><?php _e('Note: If you find any unsual issues then please check by deleting cache using the "Delete Cache" button below.And if you found our plugin helpful and like our plugin then please don\'t forget to give us a rating <a href="https://wordpress.org/support/view/plugin-reviews/accesspress-social-counter#postform"> here </a>. Its the only way to keep us motivated to make the plugin even better.
38
  ','accesspress-social-counter');?></div>
39
  <?php if(isset($_SESSION['apsc_message'])){?><div class="apsc-success-message"><p><?php echo $_SESSION['apsc_message'];unset($_SESSION['apsc_message']);?></p></div><?php }?>
40
  <div class="apsc-boards-wrapper">
@@ -42,6 +42,7 @@ $apsc_settings = $this->apsc_settings;
42
  <li><a href="javascript:void(0)" id="social-profile-settings" class="apsc-tabs-trigger apsc-active-tab"><?php _e('Social Profiles', 'accesspress-social-counter') ?></a></li>
43
  <li><a href="javascript:void(0)" id="display-settings" class="apsc-tabs-trigger"><?php _e('Display Settings', 'accesspress-social-counter'); ?></a></li>
44
  <li><a href="javascript:void(0)" id="cache-settings" class="apsc-tabs-trigger"><?php _e('Cache Settings', 'accesspress-social-counter'); ?></a></li>
 
45
  <li><a href="javascript:void(0)" id="how_to_use-settings" class="apsc-tabs-trigger"><?php _e('How to use', 'accesspress-social-counter'); ?></a></li>
46
  <li><a href="javascript:void(0)" id="about-settings" class="apsc-tabs-trigger"><?php _e('About', 'anonymous-post'); ?></a></li>
47
  </ul>
@@ -69,6 +70,13 @@ $apsc_settings = $this->apsc_settings;
69
  * */
70
  include_once('boards/cache-settings.php');
71
  ?>
 
 
 
 
 
 
 
72
 
73
  <?php
74
  /**
34
 
35
  <div class="apsc-title"><?php _e('AccessPress Social Counter', 'accesspress-social-counter'); ?></div>
36
  </div>
37
+ <div class="apsc-extra-note"><?php _e('Note: Please check the System Status if your server system status meets all the requirement for the plugin before you use the plugin.<br/><br/> If you find any unsual issues then please check by deleting cache using the "Delete Cache" button below.And if you found our plugin helpful and like our plugin then please don\'t forget to give us a rating <a href="https://wordpress.org/support/view/plugin-reviews/accesspress-social-counter#postform"> here </a>. Its the only way to keep us motivated to make the plugin even better.
38
  ','accesspress-social-counter');?></div>
39
  <?php if(isset($_SESSION['apsc_message'])){?><div class="apsc-success-message"><p><?php echo $_SESSION['apsc_message'];unset($_SESSION['apsc_message']);?></p></div><?php }?>
40
  <div class="apsc-boards-wrapper">
42
  <li><a href="javascript:void(0)" id="social-profile-settings" class="apsc-tabs-trigger apsc-active-tab"><?php _e('Social Profiles', 'accesspress-social-counter') ?></a></li>
43
  <li><a href="javascript:void(0)" id="display-settings" class="apsc-tabs-trigger"><?php _e('Display Settings', 'accesspress-social-counter'); ?></a></li>
44
  <li><a href="javascript:void(0)" id="cache-settings" class="apsc-tabs-trigger"><?php _e('Cache Settings', 'accesspress-social-counter'); ?></a></li>
45
+ <li><a href="javascript:void(0)" id="system-status" class="apsc-tabs-trigger"><?php _e('System Status', 'accesspress-social-counter'); ?></a></li>
46
  <li><a href="javascript:void(0)" id="how_to_use-settings" class="apsc-tabs-trigger"><?php _e('How to use', 'accesspress-social-counter'); ?></a></li>
47
  <li><a href="javascript:void(0)" id="about-settings" class="apsc-tabs-trigger"><?php _e('About', 'anonymous-post'); ?></a></li>
48
  </ul>
70
  * */
71
  include_once('boards/cache-settings.php');
72
  ?>
73
+
74
+ <?php
75
+ /**
76
+ * System Status
77
+ * */
78
+ include_once('boards/system-status.php');
79
+ ?>
80
 
81
  <?php
82
  /**
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: 3.8
6
  Tested up to: 4.3
7
- Stable tag: 1.4.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -125,6 +125,9 @@ Once you install the plugin , you can check some general documentation about how
125
  5. Backend Cache Settings Section
126
 
127
  == Changelog ==
 
 
 
128
  = 1.4.6 =
129
  * Added some css to resolve the conflict
130
 
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.3
7
+ Stable tag: 1.4.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
125
  5. Backend Cache Settings Section
126
 
127
  == Changelog ==
128
+ = 1.4.7 =
129
+ * Added system status tab
130
+
131
  = 1.4.6 =
132
  * Added some css to resolve the conflict
133