Version Description
- Bug fix related to Google+
Download this release
Release Info
Developer | Access Keys |
Plugin | Social Counter for WordPress – AccessPress Social Counter |
Version | 1.8.3 |
Comparing to | |
See all releases |
Code changes from version 1.8.1 to 1.8.3
- accesspress-social-counter.php +298 -234
- inc/backend/boards/about.php +69 -51
- inc/backend/boards/display-settings.php +3 -3
- inc/backend/boards/how-to-use.php +1 -1
- inc/backend/boards/social-profiles.php +0 -53
- inc/backend/settings.php +76 -68
- inc/frontend/api.php +0 -3
- inc/frontend/shortcode.php +0 -3
- inc/frontend/social_network/div/googlePlus.php +0 -12
- inc/frontend/social_network/extract_count/googlePlus.php +0 -30
- readme.txt +11 -5
accesspress-social-counter.php
CHANGED
@@ -6,7 +6,7 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
|
6 |
* Plugin Name: AccessPress Social Counter
|
7 |
* Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-counter/
|
8 |
* Description: A plugin to display your social accounts fans, subscribers and followers number on your website with handful of backend settings and interface.
|
9 |
-
* Version: 1.8.
|
10 |
* Author: AccessPress Themes
|
11 |
* Author URI: http://accesspressthemes.com
|
12 |
* Text Domain: aps-counter
|
@@ -20,31 +20,47 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
|
20 |
* */
|
21 |
|
22 |
if ( ! defined( 'SC_IMAGE_DIR' ) ) {
|
23 |
-
|
24 |
}
|
25 |
if ( ! defined( 'SC_JS_DIR' ) ) {
|
26 |
-
|
27 |
}
|
28 |
if ( ! defined( 'SC_CSS_DIR' ) ) {
|
29 |
-
|
30 |
}
|
31 |
if ( ! defined( 'SC_VERSION' ) ) {
|
32 |
-
|
33 |
}
|
34 |
if ( ! defined( 'SC_PATH' ) ) {
|
35 |
-
|
36 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
/**
|
38 |
* Register of widgets
|
39 |
* */
|
40 |
include_once('inc/backend/widget.php');
|
41 |
if ( ! class_exists( 'SC_Class' ) ) {
|
42 |
|
43 |
-
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
register_activation_hook( __FILE__, array( $this, 'load_default_settings' ) ); //loads default settings for the plugin while activating the plugin
|
49 |
add_action( 'init', array( $this, 'plugin_text_domain' ) ); //loads text domain for translation ready
|
50 |
add_action( 'admin_menu', array( $this, 'add_sc_menu' ) ); //adds plugin menu in wp-admin
|
@@ -56,6 +72,52 @@ if ( ! class_exists( 'SC_Class' ) ) {
|
|
56 |
add_shortcode( 'aps-counter', array( $this, 'apsc_shortcode' ) ); //adds a shortcode
|
57 |
add_shortcode( 'aps-get-count', array( $this, 'apsc_count_shortcode' ) ); //
|
58 |
add_action( 'admin_post_apsc_delete_cache', array( $this, 'apsc_delete_cache' ) ); //deletes the counter values from cache
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
60 |
|
61 |
/**
|
@@ -63,148 +125,150 @@ if ( ! class_exists( 'SC_Class' ) ) {
|
|
63 |
*/
|
64 |
|
65 |
function plugin_text_domain(){
|
66 |
-
|
67 |
-
|
68 |
|
69 |
/**
|
70 |
* Load Default Settings
|
71 |
**/
|
72 |
|
73 |
function load_default_settings(){
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
}
|
78 |
}
|
|
|
79 |
|
80 |
/**
|
81 |
* Plugin Admin Menu
|
82 |
*/
|
83 |
|
84 |
function add_sc_menu(){
|
85 |
-
|
86 |
-
|
|
|
|
|
|
|
87 |
|
88 |
/**
|
89 |
* Plugin Main Settings Page
|
90 |
*/
|
91 |
|
92 |
function sc_settings(){
|
93 |
-
|
94 |
-
|
95 |
|
96 |
/**
|
97 |
* Registering of backend js and css
|
98 |
*/
|
99 |
|
100 |
function register_admin_assets(){
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
wp_enqueue_script( 'sc-wpac-time-js', SC_JS_DIR . '/wpac-time.js', array( 'jquery' ), SC_VERSION ); // Third Party API for Facebook followers count
|
105 |
wp_enqueue_script( 'sc-wpac-js', SC_JS_DIR . '/wpac.js', array( 'jquery' ), SC_VERSION ); // Third Party API for Facebook followers count
|
|
|
|
|
106 |
}
|
107 |
-
wp_enqueue_style( 'fontawesome-css', SC_CSS_DIR . '/font-awesome.min.css', false, SC_VERSION );
|
108 |
-
}
|
109 |
|
110 |
/**
|
111 |
* Registers Frontend Assets
|
112 |
* */
|
113 |
function register_frontend_assets(){
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
}
|
120 |
-
if ( $enable_frontend_css ) {
|
121 |
-
wp_enqueue_style( 'apsc-frontend-css', SC_CSS_DIR . '/frontend.css', array(), SC_VERSION );
|
122 |
-
}
|
123 |
}
|
|
|
|
|
|
|
|
|
124 |
|
125 |
/**
|
126 |
* Saves settings to database
|
127 |
*/
|
128 |
function apsc_settings_action(){
|
129 |
-
|
130 |
-
|
131 |
-
}
|
132 |
}
|
|
|
133 |
|
134 |
/**
|
135 |
* Prints array in pre format
|
136 |
*/
|
137 |
function print_array( $array ){
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
|
143 |
/**
|
144 |
* Restores the default
|
145 |
*/
|
146 |
function apsc_restore_default(){
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
}
|
153 |
}
|
|
|
154 |
|
155 |
/**
|
156 |
* Returns Default Settings
|
157 |
*/
|
158 |
function get_default_settings(){
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
}
|
176 |
|
177 |
/**
|
178 |
* AccessPress Social Counter Widget
|
179 |
*/
|
180 |
function register_apsc_widget(){
|
181 |
-
|
182 |
-
|
183 |
|
184 |
/**
|
185 |
* Adds Shortcode
|
186 |
*/
|
187 |
function apsc_shortcode( $atts ){
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
|
195 |
/**
|
196 |
* Clears the counter cache
|
197 |
*/
|
198 |
function apsc_delete_cache(){
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
|
209 |
/**
|
210 |
*
|
@@ -216,11 +280,11 @@ if ( ! class_exists( 'SC_Class' ) ) {
|
|
216 |
* @return string
|
217 |
*/
|
218 |
function authorization( $user, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret ){
|
219 |
-
|
220 |
-
|
221 |
|
222 |
-
|
223 |
-
|
224 |
|
225 |
/**
|
226 |
*
|
@@ -231,16 +295,16 @@ if ( ! class_exists( 'SC_Class' ) ) {
|
|
231 |
* @return type string
|
232 |
*/
|
233 |
function signature_base_string( $url, $query, $method, $params ){
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
foreach ( $params as $key => $value ) {
|
238 |
-
$return[] = $key . '=' . $value;
|
239 |
-
}
|
240 |
|
241 |
-
|
|
|
242 |
}
|
243 |
|
|
|
|
|
|
|
244 |
/**
|
245 |
*
|
246 |
* @param type $query
|
@@ -251,22 +315,22 @@ if ( ! class_exists( 'SC_Class' ) ) {
|
|
251 |
* @return type array
|
252 |
*/
|
253 |
function signature( $query, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret ){
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
|
271 |
/**
|
272 |
* Build the header.
|
@@ -276,50 +340,50 @@ if ( ! class_exists( 'SC_Class' ) ) {
|
|
276 |
* @return string OAuth Authorization.
|
277 |
*/
|
278 |
public function header( $signature ){
|
279 |
-
|
280 |
-
|
281 |
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
|
286 |
-
|
287 |
|
288 |
-
|
289 |
-
|
290 |
|
291 |
/**
|
292 |
* Returns twitter count
|
293 |
*/
|
294 |
function get_twitter_count(){
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
|
324 |
/**
|
325 |
*
|
@@ -327,21 +391,21 @@ if ( ! class_exists( 'SC_Class' ) ) {
|
|
327 |
* @param string $format
|
328 |
*/
|
329 |
function get_formatted_count( $count, $format ){
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
}
|
343 |
-
return $count;
|
344 |
}
|
|
|
|
|
345 |
|
346 |
/**
|
347 |
*
|
@@ -350,116 +414,116 @@ if ( ! class_exists( 'SC_Class' ) ) {
|
|
350 |
*/
|
351 |
function abreviateTotalCount( $value ){
|
352 |
|
353 |
-
|
354 |
|
355 |
-
|
356 |
|
357 |
-
|
358 |
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
|
364 |
-
|
365 |
|
366 |
// Query in FQL
|
367 |
-
|
368 |
-
|
369 |
|
370 |
-
|
371 |
|
372 |
// Facebook Response is in JSON
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
|
388 |
/**
|
389 |
*
|
390 |
* Counter Only Shortcode
|
391 |
* */
|
392 |
function apsc_count_shortcode( $atts ){
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
|
402 |
/**
|
403 |
* Get Facebook Access Token
|
404 |
* */
|
405 |
function get_fb_access_token(){
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
}
|
418 |
}
|
|
|
419 |
|
420 |
/**
|
421 |
* Get New Facebook Count
|
422 |
* */
|
423 |
function new_fb_count(){
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
$api_url = 'https://graph.facebook.com/v3.0/'; //not working
|
431 |
//$api_url = 'https://graph.facebook.com/v2.8/'; // not working
|
432 |
//$api_url = 'https://graph.facebook.com/v3.2/'; // not working
|
433 |
$url = sprintf(
|
434 |
-
|
435 |
);
|
436 |
-
|
437 |
$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' ] : ' ';
|
438 |
$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' ] : ' ';
|
439 |
|
440 |
if ( $fb_access_token != '' && $fb_page_id != '' ) {
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
}
|
461 |
return $count;
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
}
|
6 |
* Plugin Name: AccessPress Social Counter
|
7 |
* Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-counter/
|
8 |
* Description: A plugin to display your social accounts fans, subscribers and followers number on your website with handful of backend settings and interface.
|
9 |
+
* Version: 1.8.3
|
10 |
* Author: AccessPress Themes
|
11 |
* Author URI: http://accesspressthemes.com
|
12 |
* Text Domain: aps-counter
|
20 |
* */
|
21 |
|
22 |
if ( ! defined( 'SC_IMAGE_DIR' ) ) {
|
23 |
+
define( 'SC_IMAGE_DIR', plugin_dir_url( __FILE__ ) . 'images' );
|
24 |
}
|
25 |
if ( ! defined( 'SC_JS_DIR' ) ) {
|
26 |
+
define( 'SC_JS_DIR', plugin_dir_url( __FILE__ ) . 'js' );
|
27 |
}
|
28 |
if ( ! defined( 'SC_CSS_DIR' ) ) {
|
29 |
+
define( 'SC_CSS_DIR', plugin_dir_url( __FILE__ ) . 'css' );
|
30 |
}
|
31 |
if ( ! defined( 'SC_VERSION' ) ) {
|
32 |
+
define( 'SC_VERSION', '1.8.3' );
|
33 |
}
|
34 |
if ( ! defined( 'SC_PATH' ) ) {
|
35 |
+
define( 'SC_PATH', plugin_dir_path( __FILE__ ) );
|
36 |
}
|
37 |
+
|
38 |
+
defined('APSC_LITE_PLUGIN_NAME') or define('APSC_LITE_PLUGIN_NAME', 'AccessPress Social Counter');
|
39 |
+
defined('APSC_LITE_DEMO') or define('APSC_LITE_DEMO', 'http://demo.accesspressthemes.com/wordpress-plugins/accesspress-social-counter');
|
40 |
+
defined('APSC_LITE_DOC') or define('APSC_LITE_DOC', 'https://accesspressthemes.com/documentation/accesspress-social-counter/');
|
41 |
+
defined('APSC_LITE_DETAIL') or define('APSC_LITE_DETAIL', 'https://accesspressthemes.com/wordpress-plugins/accesspress-social-counter/');
|
42 |
+
defined('APSC_LITE_RATING') or define('APSC_LITE_RATING', 'https://wordpress.org/support/plugin/accesspress-social-counter/reviews/#new-post');
|
43 |
+
|
44 |
+
|
45 |
+
|
46 |
+
defined('APSC_PRO_PLUGIN_NAME') or define('APSC_PRO_PLUGIN_NAME', 'AccessPress Social Pro');
|
47 |
+
defined('APSC_PRO_LINK') or define('APSC_PRO_LINK','https://1.envato.market/c/1302794/275988/4415?u=https%3A%2F%2Fcodecanyon.net%2Fitem%2Faccesspress-social-pro%2F10429645
|
48 |
+
');
|
49 |
+
defined('APSC_PRO_DEMO') or define('APSC_PRO_DEMO', 'http://demo.accesspressthemes.com/wordpress-plugins/accesspress-social-pro');
|
50 |
+
defined('APSC_PRO_DETAIL') or define('APSC_PRO_DETAIL', 'https://accesspressthemes.com/wordpress-plugins/accesspress-social-pro/');
|
51 |
+
|
52 |
+
|
53 |
/**
|
54 |
* Register of widgets
|
55 |
* */
|
56 |
include_once('inc/backend/widget.php');
|
57 |
if ( ! class_exists( 'SC_Class' ) ) {
|
58 |
|
59 |
+
class SC_Class{
|
60 |
|
61 |
+
var $apsc_settings;
|
62 |
+
function __construct(){
|
63 |
+
$this -> apsc_settings = get_option( 'apsc_settings' );
|
64 |
register_activation_hook( __FILE__, array( $this, 'load_default_settings' ) ); //loads default settings for the plugin while activating the plugin
|
65 |
add_action( 'init', array( $this, 'plugin_text_domain' ) ); //loads text domain for translation ready
|
66 |
add_action( 'admin_menu', array( $this, 'add_sc_menu' ) ); //adds plugin menu in wp-admin
|
72 |
add_shortcode( 'aps-counter', array( $this, 'apsc_shortcode' ) ); //adds a shortcode
|
73 |
add_shortcode( 'aps-get-count', array( $this, 'apsc_count_shortcode' ) ); //
|
74 |
add_action( 'admin_post_apsc_delete_cache', array( $this, 'apsc_delete_cache' ) ); //deletes the counter values from cache
|
75 |
+
|
76 |
+
add_filter( 'plugin_row_meta', array( $this, 'apsc_plugin_row_meta' ), 10, 2 );
|
77 |
+
add_filter( 'admin_footer_text', array( $this, 'apsc_admin_footer_text' ) );
|
78 |
+
add_action( 'admin_init', array( $this, 'redirect_to_site' ), 1 );
|
79 |
+
|
80 |
+
}
|
81 |
+
|
82 |
+
function redirect_to_site(){
|
83 |
+
|
84 |
+
if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'apsc-documentation' ) {
|
85 |
+
wp_redirect( APSC_LITE_DOC );
|
86 |
+
exit();
|
87 |
+
}
|
88 |
+
|
89 |
+
if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'apsc-premium' ) {
|
90 |
+
wp_redirect( APSC_PRO_LINK );
|
91 |
+
exit();
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
|
96 |
+
function apsc_plugin_row_meta( $links, $file ){
|
97 |
+
if ( strpos( $file, 'accesspress-social-counter.php' ) !== false ) {
|
98 |
+
$new_links = array(
|
99 |
+
'demo' => '<a href="'.APSC_LITE_DEMO.'" target="_blank"><span class="dashicons dashicons-welcome-view-site"></span>Live Demo</a>',
|
100 |
+
'doc' => '<a href="'.APSC_LITE_DOC.'" target="_blank"><span class="dashicons dashicons-media-document"></span>Documentation</a>',
|
101 |
+
'support' => '<a href="http://accesspressthemes.com/support" target="_blank"><span class="dashicons dashicons-admin-users"></span>Support</a>',
|
102 |
+
'pro' => '<a href="'.APSC_PRO_LINK.'" target="_blank"><span class="dashicons dashicons-cart"></span>Premium version</a>'
|
103 |
+
);
|
104 |
+
$links = array_merge( $links, $new_links );
|
105 |
+
}
|
106 |
+
return $links;
|
107 |
+
}
|
108 |
+
|
109 |
+
function apsc_admin_footer_text( $text ){
|
110 |
+
global $post;
|
111 |
+
if ( isset($_GET['page']) && $_GET['page'] === 'ap-social-counter') {
|
112 |
+
|
113 |
+
$text = 'Enjoyed ' . APSC_LITE_PLUGIN_NAME . '? <a href="' . APSC_LITE_RATING . '" target="_blank">Please leave us a ★★★★★ rating</a> We really appreciate your support! | Try premium version of <a href="' . APSC_PRO_LINK . '" target="_blank">' . APSC_PRO_PLUGIN_NAME . '</a> - more features, more power!';
|
114 |
+
return $text;
|
115 |
+
|
116 |
+
} else {
|
117 |
+
|
118 |
+
return $text;
|
119 |
+
|
120 |
+
}
|
121 |
}
|
122 |
|
123 |
/**
|
125 |
*/
|
126 |
|
127 |
function plugin_text_domain(){
|
128 |
+
load_plugin_textdomain( 'accesspress-social-counter', false, basename( dirname( __FILE__ ) ) . '/languages/' );
|
129 |
+
}
|
130 |
|
131 |
/**
|
132 |
* Load Default Settings
|
133 |
**/
|
134 |
|
135 |
function load_default_settings(){
|
136 |
+
if ( ! get_option( 'apsc_settings' ) ) {
|
137 |
+
$apsc_settings = $this -> get_default_settings();
|
138 |
+
update_option( 'apsc_settings', $apsc_settings );
|
|
|
139 |
}
|
140 |
+
}
|
141 |
|
142 |
/**
|
143 |
* Plugin Admin Menu
|
144 |
*/
|
145 |
|
146 |
function add_sc_menu(){
|
147 |
+
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' );
|
148 |
+
|
149 |
+
add_submenu_page('ap-social-counter', __('Documentation', 'accesspress-social-counter'), __('Documentation', 'accesspress-social-counter'), 'manage_options', 'apsc-documentation', '__return_false', null, 9);
|
150 |
+
add_submenu_page('ap-social-counter', __('Check Premium Version', 'accesspress-social-counter'), __('Check Premium Version', 'accesspress-social-counter'), 'manage_options', 'apsc-premium', '__return_false', null, 9);
|
151 |
+
}
|
152 |
|
153 |
/**
|
154 |
* Plugin Main Settings Page
|
155 |
*/
|
156 |
|
157 |
function sc_settings(){
|
158 |
+
include('inc/backend/settings.php');
|
159 |
+
}
|
160 |
|
161 |
/**
|
162 |
* Registering of backend js and css
|
163 |
*/
|
164 |
|
165 |
function register_admin_assets(){
|
166 |
+
if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'ap-social-counter' ) {
|
167 |
+
wp_enqueue_style( 'sc-admin-css', SC_CSS_DIR . '/backend.css', array(), SC_VERSION );
|
168 |
+
wp_enqueue_script( 'sc-admin-js', SC_JS_DIR . '/backend.js', array( 'jquery', 'jquery-ui-sortable' ), SC_VERSION );
|
169 |
wp_enqueue_script( 'sc-wpac-time-js', SC_JS_DIR . '/wpac-time.js', array( 'jquery' ), SC_VERSION ); // Third Party API for Facebook followers count
|
170 |
wp_enqueue_script( 'sc-wpac-js', SC_JS_DIR . '/wpac.js', array( 'jquery' ), SC_VERSION ); // Third Party API for Facebook followers count
|
171 |
+
}
|
172 |
+
wp_enqueue_style( 'fontawesome-css', SC_CSS_DIR . '/font-awesome.min.css', false, SC_VERSION );
|
173 |
}
|
|
|
|
|
174 |
|
175 |
/**
|
176 |
* Registers Frontend Assets
|
177 |
* */
|
178 |
function register_frontend_assets(){
|
179 |
+
$apsc_settings = $this -> apsc_settings;
|
180 |
+
$enable_font_css = (isset( $apsc_settings[ 'disable_font_css' ] ) && $apsc_settings[ 'disable_font_css' ] == 0) ? true : false;
|
181 |
+
$enable_frontend_css = (isset( $apsc_settings[ 'disable_frontend_css' ] ) && $apsc_settings[ 'disable_frontend_css' ] == 0) ? true : false;
|
182 |
+
if ( $enable_font_css ) {
|
183 |
+
wp_enqueue_style( 'fontawesome-css', SC_CSS_DIR . '/font-awesome.min.css', false, SC_VERSION );
|
|
|
|
|
|
|
|
|
184 |
}
|
185 |
+
if ( $enable_frontend_css ) {
|
186 |
+
wp_enqueue_style( 'apsc-frontend-css', SC_CSS_DIR . '/frontend.css', array(), SC_VERSION );
|
187 |
+
}
|
188 |
+
}
|
189 |
|
190 |
/**
|
191 |
* Saves settings to database
|
192 |
*/
|
193 |
function apsc_settings_action(){
|
194 |
+
if ( ! empty( $_POST ) && wp_verify_nonce( $_POST[ 'apsc_settings_nonce' ], 'apsc_settings_action' ) ) {
|
195 |
+
include('inc/backend/save-settings.php');
|
|
|
196 |
}
|
197 |
+
}
|
198 |
|
199 |
/**
|
200 |
* Prints array in pre format
|
201 |
*/
|
202 |
function print_array( $array ){
|
203 |
+
echo "<pre>";
|
204 |
+
print_r( $array );
|
205 |
+
echo "</pre>";
|
206 |
+
}
|
207 |
|
208 |
/**
|
209 |
* Restores the default
|
210 |
*/
|
211 |
function apsc_restore_default(){
|
212 |
+
if ( ! empty( $_GET ) && wp_verify_nonce( $_GET[ '_wpnonce' ], 'apsc-restore-default-nonce' ) ) {
|
213 |
+
$apsc_settings = $this -> get_default_settings();
|
214 |
+
update_option( 'apsc_settings', $apsc_settings );
|
215 |
+
$_SESSION[ 'apsc_message' ] = __( 'Default Settings Restored Successfully', 'accesspress-social-counter' );
|
216 |
+
wp_redirect( admin_url() . 'admin.php?page=ap-social-counter' );
|
|
|
217 |
}
|
218 |
+
}
|
219 |
|
220 |
/**
|
221 |
* Returns Default Settings
|
222 |
*/
|
223 |
function get_default_settings(){
|
224 |
+
$apsc_settings = array( 'social_profile' => array( 'facebook' => array( 'page_id' => '' ),
|
225 |
+
'twitter' => array( 'username' => '', 'consumer_key' => '', 'consumer_secret' => '', 'access_token' => '', 'access_token_secret' => '' ),
|
226 |
+
'instagram' => array( 'username' => '', 'access_token' => '', 'user_id' => '' ),
|
227 |
+
'youtube' => array( 'username' => '', 'channel_url' => '' ),
|
228 |
+
'soundcloud' => array( 'username' => '', 'client_id' => '' ),
|
229 |
+
'dribbble' => array( 'username' => '' ),
|
230 |
+
),
|
231 |
+
'profile_order' => array( 'facebook', 'twitter', 'instagram', 'youtube', 'soundcloud', 'dribbble', 'posts', 'comments' ),
|
232 |
+
'social_profile_theme' => 'theme-1',
|
233 |
+
'counter_format' => 'comma',
|
234 |
+
'cache_period' => '',
|
235 |
+
'disable_font_css' => 0,
|
236 |
+
'disable_frontend_css' => 0
|
237 |
+
);
|
238 |
+
return $apsc_settings;
|
239 |
+
}
|
|
|
240 |
|
241 |
/**
|
242 |
* AccessPress Social Counter Widget
|
243 |
*/
|
244 |
function register_apsc_widget(){
|
245 |
+
register_widget( 'APSC_Widget' );
|
246 |
+
}
|
247 |
|
248 |
/**
|
249 |
* Adds Shortcode
|
250 |
*/
|
251 |
function apsc_shortcode( $atts ){
|
252 |
+
ob_start();
|
253 |
+
include('inc/frontend/shortcode.php');
|
254 |
+
$html = ob_get_contents();
|
255 |
+
ob_get_clean();
|
256 |
+
return $html;
|
257 |
+
}
|
258 |
|
259 |
/**
|
260 |
* Clears the counter cache
|
261 |
*/
|
262 |
function apsc_delete_cache(){
|
263 |
+
if ( ! empty( $_GET ) && wp_verify_nonce( $_GET[ '_wpnonce' ], 'apsc-cache-nonce' ) ) {
|
264 |
+
$transient_array = array( 'apsc_facebook', 'apsc_twitter', 'apsc_youtube', 'apsc_instagram','apsc_soundcloud', 'apsc_dribbble', 'apsc_posts', 'apsc_comments' );
|
265 |
+
foreach ( $transient_array as $transient ) {
|
266 |
+
delete_transient( $transient );
|
267 |
+
}
|
268 |
+
$_SESSION[ 'apsc_message' ] = __( 'Cache Deleted Successfully', 'accesspress-social-counter' );
|
269 |
+
wp_redirect( admin_url() . 'admin.php?page=ap-social-counter' );
|
270 |
+
}
|
271 |
+
}
|
272 |
|
273 |
/**
|
274 |
*
|
280 |
* @return string
|
281 |
*/
|
282 |
function authorization( $user, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret ){
|
283 |
+
$query = 'screen_name=' . $user;
|
284 |
+
$signature = $this -> signature( $query, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret );
|
285 |
|
286 |
+
return $this -> header( $signature );
|
287 |
+
}
|
288 |
|
289 |
/**
|
290 |
*
|
295 |
* @return type string
|
296 |
*/
|
297 |
function signature_base_string( $url, $query, $method, $params ){
|
298 |
+
$return = array();
|
299 |
+
ksort( $params );
|
|
|
|
|
|
|
|
|
300 |
|
301 |
+
foreach ( $params as $key => $value ) {
|
302 |
+
$return[] = $key . '=' . $value;
|
303 |
}
|
304 |
|
305 |
+
return $method . "&" . rawurlencode( $url ) . '&' . rawurlencode( implode( '&', $return ) ) . '%26' . rawurlencode( $query );
|
306 |
+
}
|
307 |
+
|
308 |
/**
|
309 |
*
|
310 |
* @param type $query
|
315 |
* @return type array
|
316 |
*/
|
317 |
function signature( $query, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret ){
|
318 |
+
$oauth = array(
|
319 |
+
'oauth_consumer_key' => $consumer_key,
|
320 |
+
'oauth_nonce' => hash_hmac( 'sha1', time(), true ),
|
321 |
+
'oauth_signature_method' => 'HMAC-SHA1',
|
322 |
+
'oauth_token' => $oauth_access_token,
|
323 |
+
'oauth_timestamp' => time(),
|
324 |
+
'oauth_version' => '1.0'
|
325 |
+
);
|
326 |
+
$api_url = 'https://api.twitter.com/1.1/users/show.json';
|
327 |
+
$base_info = $this -> signature_base_string( $api_url, $query, 'GET', $oauth );
|
328 |
+
$composite_key = rawurlencode( $consumer_secret ) . '&' . rawurlencode( $oauth_access_token_secret );
|
329 |
+
$oauth_signature = base64_encode( hash_hmac( 'sha1', $base_info, $composite_key, true ) );
|
330 |
+
$oauth[ 'oauth_signature' ] = $oauth_signature;
|
331 |
+
|
332 |
+
return $oauth;
|
333 |
+
}
|
334 |
|
335 |
/**
|
336 |
* Build the header.
|
340 |
* @return string OAuth Authorization.
|
341 |
*/
|
342 |
public function header( $signature ){
|
343 |
+
$return = 'OAuth ';
|
344 |
+
$values = array();
|
345 |
|
346 |
+
foreach ( $signature as $key => $value ) {
|
347 |
+
$values[] = $key . '="' . rawurlencode( $value ) . '"';
|
348 |
+
}
|
349 |
|
350 |
+
$return .= implode( ', ', $values );
|
351 |
|
352 |
+
return $return;
|
353 |
+
}
|
354 |
|
355 |
/**
|
356 |
* Returns twitter count
|
357 |
*/
|
358 |
function get_twitter_count(){
|
359 |
+
$apsc_settings = $this -> apsc_settings;
|
360 |
+
$user = $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'username' ];
|
361 |
+
$api_url = 'https://api.twitter.com/1.1/users/show.json';
|
362 |
+
$params = array(
|
363 |
+
'method' => 'GET',
|
364 |
+
'sslverify' => false,
|
365 |
+
'timeout' => 60,
|
366 |
+
'headers' => array(
|
367 |
+
'Content-Type' => 'application/x-www-form-urlencoded',
|
368 |
+
'Authorization' => $this -> authorization(
|
369 |
+
$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' ]
|
370 |
+
)
|
371 |
+
)
|
372 |
+
);
|
373 |
+
|
374 |
+
$connection = wp_remote_get( $api_url . '?screen_name=' . $user, $params );
|
375 |
+
if ( is_wp_error( $connection ) ) {
|
376 |
+
$count = 0;
|
377 |
+
} else {
|
378 |
+
$_data = json_decode( $connection[ 'body' ], true );
|
379 |
+
if ( isset( $_data[ 'followers_count' ] ) ) {
|
380 |
+
$count = intval( $_data[ 'followers_count' ] );
|
381 |
+
} else {
|
382 |
+
$count = 0;
|
383 |
+
}
|
384 |
+
}
|
385 |
+
return $count;
|
386 |
+
}
|
387 |
|
388 |
/**
|
389 |
*
|
391 |
* @param string $format
|
392 |
*/
|
393 |
function get_formatted_count( $count, $format ){
|
394 |
+
if ( $count == '' ) {
|
395 |
+
return '';
|
396 |
+
}
|
397 |
+
switch ( $format ) {
|
398 |
+
case 'comma':
|
399 |
+
$count = number_format( $count );
|
400 |
+
break;
|
401 |
+
case 'short':
|
402 |
+
$count = $this -> abreviateTotalCount( $count );
|
403 |
+
break;
|
404 |
+
default:
|
405 |
+
break;
|
|
|
|
|
406 |
}
|
407 |
+
return $count;
|
408 |
+
}
|
409 |
|
410 |
/**
|
411 |
*
|
414 |
*/
|
415 |
function abreviateTotalCount( $value ){
|
416 |
|
417 |
+
$abbreviations = array( 12 => 'T', 9 => 'B', 6 => 'M', 3 => 'K', 0 => '' );
|
418 |
|
419 |
+
foreach ( $abbreviations as $exponent => $abbreviation ) {
|
420 |
|
421 |
+
if ( $value >= pow( 10, $exponent ) ) {
|
422 |
|
423 |
+
return round( floatval( $value / pow( 10, $exponent ) ), 1 ) . $abbreviation;
|
424 |
+
}
|
425 |
+
}
|
426 |
+
}
|
427 |
|
428 |
+
function facebook_count( $url ){
|
429 |
|
430 |
// Query in FQL
|
431 |
+
$fql = "SELECT like_count ";
|
432 |
+
$fql .= " FROM link_stat WHERE url = '$url'";
|
433 |
|
434 |
+
$fqlURL = "https://api.facebook.com/method/fql.query?format=json&query=" . urlencode( $fql );
|
435 |
|
436 |
// Facebook Response is in JSON
|
437 |
+
$response = wp_remote_get( $fqlURL );
|
438 |
+
$response = json_decode( $response[ 'body' ] );
|
439 |
+
if ( is_array( $response ) && isset( $response[ 0 ] -> like_count ) ) {
|
440 |
+
return $response[ 0 ] -> like_count;
|
441 |
+
} else {
|
442 |
+
$count = '0';
|
443 |
+
return $count;
|
444 |
+
}
|
445 |
+
}
|
446 |
+
|
447 |
+
function get_count( $social_media ){
|
448 |
+
include('inc/frontend/api.php');
|
449 |
+
return $count;
|
450 |
+
}
|
451 |
|
452 |
/**
|
453 |
*
|
454 |
* Counter Only Shortcode
|
455 |
* */
|
456 |
function apsc_count_shortcode( $atts ){
|
457 |
+
if ( isset( $atts[ 'social_media' ] ) ) {
|
458 |
+
$count = $this -> get_count( $atts[ 'social_media' ] );
|
459 |
+
if ( isset( $atts[ 'count_format' ] ) && $count != '' ) {
|
460 |
+
$count = $this -> get_formatted_count( $count, $atts[ 'count_format' ] );
|
461 |
+
}
|
462 |
+
return $count;
|
463 |
+
}
|
464 |
+
}
|
465 |
|
466 |
/**
|
467 |
* Get Facebook Access Token
|
468 |
* */
|
469 |
function get_fb_access_token(){
|
470 |
+
$apsc_settings = $this -> apsc_settings;
|
471 |
+
$api_url = 'https://graph.facebook.com/';
|
472 |
+
$url = sprintf(
|
473 |
+
'%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' ]
|
474 |
+
);
|
475 |
+
$access_token = wp_remote_get( $url, array( 'timeout' => 60 ) );
|
476 |
+
|
477 |
+
if ( is_wp_error( $access_token ) || ( isset( $access_token[ 'response' ][ 'code' ] ) && 200 != $access_token[ 'response' ][ 'code' ] ) ) {
|
478 |
+
return '';
|
479 |
+
} else {
|
480 |
+
return sanitize_text_field( $access_token[ 'body' ] );
|
|
|
481 |
}
|
482 |
+
}
|
483 |
|
484 |
/**
|
485 |
* Get New Facebook Count
|
486 |
* */
|
487 |
function new_fb_count(){
|
488 |
+
$apsc_settings = $this -> apsc_settings;
|
489 |
+
$facebook_method = ( isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] ) && $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] != '' ) ? $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] : '2';
|
490 |
+
if ( $facebook_method == '1' ) {
|
491 |
+
$access_token = $this -> get_fb_access_token();
|
492 |
+
$access_token = json_decode( $access_token );
|
493 |
+
$access_token = $access_token -> access_token;
|
494 |
$api_url = 'https://graph.facebook.com/v3.0/'; //not working
|
495 |
//$api_url = 'https://graph.facebook.com/v2.8/'; // not working
|
496 |
//$api_url = 'https://graph.facebook.com/v3.2/'; // not working
|
497 |
$url = sprintf(
|
498 |
+
'%s%s?fields=fan_count&access_token=%s', $api_url, $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'page_id' ], $access_token
|
499 |
);
|
500 |
+
} else {
|
501 |
$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' ] : ' ';
|
502 |
$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' ] : ' ';
|
503 |
|
504 |
if ( $fb_access_token != '' && $fb_page_id != '' ) {
|
505 |
+
$api_url = 'https://graph.facebook.com/';
|
506 |
+
$url = sprintf(
|
507 |
+
'%s%s?fields=fan_count&access_token=%s', $api_url, $fb_page_id, $fb_access_token
|
508 |
+
);
|
509 |
+
} else {
|
510 |
+
$url = 'https://graph.facebook.com/';
|
511 |
+
}
|
512 |
+
}
|
513 |
+
$connection = wp_remote_get( $url, array( 'timeout' => 60 ) );
|
514 |
+
|
515 |
+
if ( is_wp_error( $connection ) || ( isset( $connection[ 'response' ][ 'code' ] ) && 200 != $connection[ 'response' ][ 'code' ] ) ) {
|
516 |
+
$count = 0;
|
517 |
+
} else {
|
518 |
+
$_data = json_decode( $connection[ 'body' ], true );
|
519 |
+
if ( isset( $_data[ 'fan_count' ] ) ) {
|
520 |
+
$count = intval( $_data[ 'fan_count' ] );
|
521 |
+
} else {
|
522 |
+
$count = 0;
|
523 |
+
}
|
524 |
}
|
525 |
return $count;
|
526 |
+
}
|
527 |
+
}
|
528 |
+
$sc_object = new SC_Class();
|
529 |
+
}
|
inc/backend/boards/about.php
CHANGED
@@ -5,62 +5,80 @@
|
|
5 |
<p><?php _e( 'AccessPress Themes is a venture of Access Keys - who has developed hundreds of Custom WordPress themes and plugins for its clients over the years.', 'accesspress-social-counter' ); ?> </p>
|
6 |
|
7 |
<p><strong><?php _e( 'AccessPress Social Counter', 'accesspress-social-counter' ); ?></strong><?php _e( 'is a', 'accesspress-social-counter' ); ?> <strong><?php _e( 'Free WordPress plugin', 'accesspress-social-counter' ); ?>
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
<
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
<
|
24 |
-
|
25 |
-
</a>
|
26 |
-
</div>
|
27 |
-
<div class = "product">
|
28 |
-
<a href = "http://accesspressthemes.com/wordpress-themes" target = "_blank">
|
29 |
-
<span class = "product-title"><?php _e( 'WordPress Themes', 'accesspress-social-counter' ); ?></span>
|
30 |
-
<img src = "<?php echo SC_IMAGE_DIR; ?>/theme.png" alt = "<?php esc_attr_e( 'WordPress Themes', 'accesspress-social-counter' ); ?>" />
|
31 |
-
</a>
|
32 |
-
</div>
|
33 |
|
34 |
-
|
35 |
-
<
|
36 |
-
<
|
37 |
-
<
|
38 |
-
</
|
39 |
-
</div>
|
40 |
|
|
|
|
|
|
|
|
|
41 |
|
42 |
-
<div class = "seperator"></div><div class = "dottedline"></div><div class = "seperator"></div>
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
-
<p><strong><?php _e( 'Like us on facebook', 'accesspress-social-counter' ); ?>:</strong><br />
|
56 |
-
<iframe style = "border: none; overflow: hidden; width: 764px; height: 206px;" src = "//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FAccessPress-Themes%2F1396595907277967&width=842&height=258&colorscheme=light&show_faces=true&header=false&stream=false&show_border=true&appId=1411139805828592" width = "240" height = "150" frameborder = "0" scrolling = "no"></iframe></p>
|
57 |
|
58 |
-
|
59 |
-
<li><a href = "https://plus.google.com/u/0/+Accesspressthemesprofile/about" target = "_blank"><img src = "<?php echo SC_IMAGE_DIR; ?>/googleplus.png" alt = "google+"></a></li>
|
60 |
-
<li><a href = "http://www.pinterest.com/accesspresswp/" target = "_blank"><img src = "<?php echo SC_IMAGE_DIR; ?>/pinterest.png" alt = "pinterest"></a></li>
|
61 |
-
<li><a href = "https://www.flickr.com/photos/accesspressthemes/" target = "_blank"><img src = "<?php echo SC_IMAGE_DIR; ?>/flicker.png" alt = "flicker"></a></li>
|
62 |
-
<li><a href = "https://twitter.com/apthemes" target = "_blank"><img src = "<?php echo SC_IMAGE_DIR; ?>/twitter.png" alt = "twitter"/></a></li>
|
63 |
-
</ul>
|
64 |
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
<p><?php _e( 'AccessPress Themes is a venture of Access Keys - who has developed hundreds of Custom WordPress themes and plugins for its clients over the years.', 'accesspress-social-counter' ); ?> </p>
|
6 |
|
7 |
<p><strong><?php _e( 'AccessPress Social Counter', 'accesspress-social-counter' ); ?></strong><?php _e( 'is a', 'accesspress-social-counter' ); ?> <strong><?php _e( 'Free WordPress plugin', 'accesspress-social-counter' ); ?>
|
8 |
+
</strong><?php _e( 'to display your social accounts fans, subscribers and followers number on your website !
|
9 |
+
A perfect plugin to show your social media stats and encourage more to join your network.
|
10 |
+
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.
|
11 |
+
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 !
|
12 |
+
The available social media in FREE version are: Facebook, Twitter, Instagram, Youtube, Sound Cloud and Dribbble along with Posts and Comments count.', 'accesspress-social-counter' ); ?> </p>
|
13 |
+
|
14 |
+
<div class = "halfseperator"></div>
|
15 |
+
<p>
|
16 |
+
<strong><?php _e( 'Please visit our product page for more details here:', 'accesspress-social-counter' ); ?></strong><br />
|
17 |
+
<a href = "https://accesspressthemes.com/wordpress-plugins/accesspress-social-counter/" target = "_blank">https://accesspressthemes.com/wordpress-plugins/accesspress-social-counter/</a>
|
18 |
+
</p>
|
19 |
+
|
20 |
+
<div class = "halfseperator"></div>
|
21 |
+
<p>
|
22 |
+
<strong><?php _e( 'Plugin documentation can be found here:', 'accesspress-social-counter' ); ?></strong><br />
|
23 |
+
<a href = "https://accesspressthemes.com/documentation/accesspress-social-counter/" target = "_blank">https://accesspressthemes.com/documentation/accesspress-social-counter/</a>
|
24 |
+
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
+
<div class = "halfseperator"></div>
|
27 |
+
<p>
|
28 |
+
<strong><?php _e( 'Plugin demo can be found here:', 'accesspress-social-counter' ); ?></strong><br />
|
29 |
+
<a href = "<?php echo APSC_LITE_DEMO; ?>" target = "_blank"><?php echo APSC_LITE_DEMO; ?></a>
|
30 |
+
</p>
|
|
|
31 |
|
32 |
+
<div class = "halfseperator"></div>
|
33 |
+
<p><strong><?php _e( 'Premium version of the plugin can be found here:', 'accesspress-social-counter' ); ?></strong><br />
|
34 |
+
<a href = "<?php echo APSC_PRO_LINK; ?>" target = "_blank"><?php echo APSC_PRO_LINK; ?></a>
|
35 |
+
</p>
|
36 |
|
|
|
37 |
|
38 |
+
<div class = "halfseperator"></div>
|
39 |
+
<h3 class = "sub-title"><?php _e( 'More from AccessPress Themes', 'accesspress-social-counter' ); ?></h3>
|
40 |
+
<div class = "product">
|
41 |
+
<a href = "http://accesspressthemes.com/plugins" target = "_blank">
|
42 |
+
<span class = "product-title"><?php _e( 'WordPress Plugins', 'accesspress-social-counter' ); ?></span>
|
43 |
+
<img src = "<?php echo SC_IMAGE_DIR; ?>/plugin.png" alt = "<?php esc_attr_e( 'WordPress Plugins', 'accesspress-social-counter' ); ?>" />
|
44 |
+
</a>
|
45 |
+
</div>
|
46 |
+
<div class = "product">
|
47 |
+
<a href = "http://accesspressthemes.com/wordpress-themes" target = "_blank">
|
48 |
+
<span class = "product-title"><?php _e( 'WordPress Themes', 'accesspress-social-counter' ); ?></span>
|
49 |
+
<img src = "<?php echo SC_IMAGE_DIR; ?>/theme.png" alt = "<?php esc_attr_e( 'WordPress Themes', 'accesspress-social-counter' ); ?>" />
|
50 |
+
</a>
|
51 |
+
</div>
|
52 |
|
53 |
+
<div class = "product">
|
54 |
+
<a href = "http://accesspressthemes.com/contact" target = "_blank">
|
55 |
+
<span class = "product-title"><?php _e( 'WordPress Customization', 'accesspress-social-counter' ); ?></span>
|
56 |
+
<img src = "<?php echo SC_IMAGE_DIR; ?>/customize.png" alt = "<?php esc_attr_e( 'WordPress Customization', 'accesspress-social-counter' ); ?>" />
|
57 |
+
</a>
|
58 |
+
</div>
|
59 |
|
|
|
|
|
60 |
|
61 |
+
<div class = "seperator"></div><div class = "dottedline"></div><div class = "seperator"></div>
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
+
<h3 class = "sub-title"><?php _e( 'Get in touch', 'accesspress-social-counter' ); ?></h3>
|
64 |
+
<p><?php _e( 'If you’ve any question/feedback, please get in touch:', 'accesspress-social-counter' ); ?> <br />
|
65 |
+
<strong><?php _e( 'General enquiries', 'accesspress-social-counter' ); ?>:</strong> <a href = "mailto:info@accesspressthemes.com">info@accesspressthemes.com</a><br />
|
66 |
+
<strong><?php _e( 'Support', 'accesspress-social-counter' ); ?>:</strong> <a href = "mailto:support@accesspressthemes.com">support@accesspressthemes.com</a><br />
|
67 |
+
<strong><?php _e( 'Sales', 'accesspress-social-counter' ); ?>:</strong> <a href = "mailto:sales@accesspressthemes.com">sales@accesspressthemes.com</a>
|
68 |
+
</p>
|
69 |
+
<div class = "seperator"></div><div class = "dottedline"></div><div class = "seperator"></div>
|
70 |
+
<h3 class = "sub-title"><?php _e( 'Get social', 'accesspress-social-counter' ); ?></h3>
|
71 |
+
<p><?php _e( 'Get connected with us on social media. Facebook is the best place to find updates on our themes/plugins', 'accesspress-social-counter' ); ?>: </p>
|
72 |
+
|
73 |
+
|
74 |
+
<p><strong><?php _e( 'Like us on facebook', 'accesspress-social-counter' ); ?>:</strong><br />
|
75 |
+
<iframe style = "border: none; overflow: hidden; width: 764px; height: 206px;" src = "//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FAccessPress-Themes%2F1396595907277967&width=842&height=258&colorscheme=light&show_faces=true&header=false&stream=false&show_border=true&appId=1411139805828592" width = "240" height = "150" frameborder = "0" scrolling = "no"></iframe></p>
|
76 |
+
|
77 |
+
<ul class = "social-icon">
|
78 |
+
<li><a href = "http://www.pinterest.com/accesspresswp/" target = "_blank"><img src = "<?php echo SC_IMAGE_DIR; ?>/pinterest.png" alt = "pinterest"></a></li>
|
79 |
+
<li><a href = "https://www.flickr.com/photos/accesspressthemes/" target = "_blank"><img src = "<?php echo SC_IMAGE_DIR; ?>/flicker.png" alt = "flicker"></a></li>
|
80 |
+
<li><a href = "https://twitter.com/apthemes" target = "_blank"><img src = "<?php echo SC_IMAGE_DIR; ?>/twitter.png" alt = "twitter"/></a></li>
|
81 |
+
</ul>
|
82 |
+
|
83 |
+
</div>
|
84 |
+
</div>
|
inc/backend/boards/display-settings.php
CHANGED
@@ -7,7 +7,6 @@
|
|
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',
|
@@ -15,15 +14,16 @@
|
|
15 |
'posts' => 'Posts',
|
16 |
'comments' => 'Comments',
|
17 |
);
|
18 |
-
//$social_profiles = array('facebook','twitter','
|
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>
|
7 |
<?php
|
8 |
$social_profiles_ref = array( 'facebook' => 'Facebook',
|
9 |
'twitter' => 'Twitter',
|
|
|
10 |
'instagram' => 'Instagram',
|
11 |
'soundcloud' => 'SoundCloud',
|
12 |
'dribbble' => 'Dribbble',
|
14 |
'posts' => 'Posts',
|
15 |
'comments' => 'Comments',
|
16 |
);
|
17 |
+
//$social_profiles = array('facebook','twitter','instagram','soundcloud','dribbble','youtube','posts','comments');
|
18 |
$social_profiles = $apsc_settings[ 'profile_order' ];
|
19 |
foreach ( $social_profiles as $social_profile ) {
|
20 |
+
if($social_profile!='googlePlus'){
|
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>
|
inc/backend/boards/how-to-use.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<p><?php _e( 'You can also pass the theme parameter in the shorcode to get the desired theme while displaying the count. For example [aps-counter theme="theme-1"] . There are 5 available themes so you can change theme-1 upto theme-5.', 'accesspress-social-counter' ); ?> </p>
|
5 |
<p><?php _e( 'For the complete documentation please visit:', 'accesspress-social-counter' ); ?><br/> <a href="https://accesspressthemes.com/documentation/accesspress-social-counter/" target="_blank">https://accesspressthemes.com/documentation/accesspress-social-counter/</a></p>
|
6 |
<p><?php _e( 'To get the individual count, please use below shortcode', 'accesspress-social-counter' ); ?></p><br /><br />
|
7 |
-
[aps-get-count social_media="facebook/twitter/
|
8 |
<p><strong>Note</strong>: Use any value separated by "/" . For example [aps-get-count social_media="facebook" count_format="short"]</p>
|
9 |
|
10 |
<p><?php _e( 'You can check our full plugin setup tutorial in below video.', 'accesspress-social-counter' ); ?></p>
|
4 |
<p><?php _e( 'You can also pass the theme parameter in the shorcode to get the desired theme while displaying the count. For example [aps-counter theme="theme-1"] . There are 5 available themes so you can change theme-1 upto theme-5.', 'accesspress-social-counter' ); ?> </p>
|
5 |
<p><?php _e( 'For the complete documentation please visit:', 'accesspress-social-counter' ); ?><br/> <a href="https://accesspressthemes.com/documentation/accesspress-social-counter/" target="_blank">https://accesspressthemes.com/documentation/accesspress-social-counter/</a></p>
|
6 |
<p><?php _e( 'To get the individual count, please use below shortcode', 'accesspress-social-counter' ); ?></p><br /><br />
|
7 |
+
[aps-get-count social_media="facebook/twitter/instagram/youtube/soundcloud/dribbble/posts/comments" count_format="default/comma/short"]
|
8 |
<p><strong>Note</strong>: Use any value separated by "/" . For example [aps-get-count social_media="facebook" count_format="short"]</p>
|
9 |
|
10 |
<p><?php _e( 'You can check our full plugin setup tutorial in below video.', 'accesspress-social-counter' ); ?></p>
|
inc/backend/boards/social-profiles.php
CHANGED
@@ -218,59 +218,6 @@
|
|
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>
|
218 |
</div>
|
219 |
<!--Twitter-->
|
220 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
<!--Instagram-->
|
222 |
<div class="apsc-option-outer-wrapper">
|
223 |
<h4><?php _e( 'Instagram', 'accesspress-social-counter' ) ?></h4>
|
inc/backend/settings.php
CHANGED
@@ -35,12 +35,14 @@ $apsc_settings = $this->apsc_settings;
|
|
35 |
<div class="apsc-title"><?php _e('AccessPress Social Counter', 'accesspress-social-counter'); ?></div>
|
36 |
</div>
|
37 |
<?php if(isset($_GET['message'])){?><div class="notice notice-success is-dismissible"><p><?php echo __('Settings Saved Successfully','accesspress-social-counter');?></p></div><?php }?>
|
38 |
-
|
|
|
|
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
</div>
|
45 |
|
46 |
<div class="apsc-boards-wrapper">
|
@@ -60,74 +62,80 @@ $apsc_settings = $this->apsc_settings;
|
|
60 |
<form class="apsc-settings-form" method="post" action="<?php echo admin_url() . 'admin-post.php' ?>">
|
61 |
<input type="hidden" name="action" value="apsc_settings_action"/>
|
62 |
<?php
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
|
97 |
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
</div>
|
122 |
-
|
123 |
|
124 |
-
</div>
|
125 |
-
<div class="apsc-promoFloat">
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
</div>
|
131 |
-
<div class="clear"></div>
|
132 |
-
</div>
|
133 |
</div><!--div class wrap-->
|
35 |
<div class="apsc-title"><?php _e('AccessPress Social Counter', 'accesspress-social-counter'); ?></div>
|
36 |
</div>
|
37 |
<?php if(isset($_GET['message'])){?><div class="notice notice-success is-dismissible"><p><?php echo __('Settings Saved Successfully','accesspress-social-counter');?></p></div><?php }?>
|
38 |
+
<div class="notice notice-info is-dismissible">
|
39 |
+
<p><?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','accesspress-social-counter');?></p>
|
40 |
+
</div>
|
41 |
|
42 |
+
<div class="notice notice-info is-dismissible">
|
43 |
+
<p>
|
44 |
+
<?php _e('If you find any unsual issues then please check by deleting cache using the "Delete Cache" button below.And if you 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" target="_blank"> here </a>. Its the only way to keep us motivated to make the plugin even better.','accesspress-social-counter');?>
|
45 |
+
</p>
|
46 |
</div>
|
47 |
|
48 |
<div class="apsc-boards-wrapper">
|
62 |
<form class="apsc-settings-form" method="post" action="<?php echo admin_url() . 'admin-post.php' ?>">
|
63 |
<input type="hidden" name="action" value="apsc_settings_action"/>
|
64 |
<?php
|
65 |
+
/**
|
66 |
+
* Social Profiles
|
67 |
+
* */
|
68 |
+
include_once('boards/social-profiles.php');
|
69 |
+
?>
|
70 |
|
71 |
+
<?php
|
72 |
+
/**
|
73 |
+
* Display Settings
|
74 |
+
* */
|
75 |
+
include_once('boards/display-settings.php');
|
76 |
+
?>
|
77 |
|
78 |
+
<?php
|
79 |
+
/**
|
80 |
+
* Captcha Settings
|
81 |
+
* */
|
82 |
+
include_once('boards/cache-settings.php');
|
83 |
+
?>
|
84 |
+
|
85 |
+
<?php
|
86 |
+
/**
|
87 |
+
* System Status
|
88 |
+
* */
|
89 |
+
include_once('boards/system-status.php');
|
90 |
+
?>
|
91 |
|
92 |
+
<?php
|
93 |
+
/**
|
94 |
+
* Captcha Settings
|
95 |
+
* */
|
96 |
+
include_once('boards/how-to-use.php');
|
97 |
+
?>
|
98 |
|
99 |
|
100 |
+
<?php
|
101 |
+
/**
|
102 |
+
* About Tab
|
103 |
+
* */
|
104 |
+
include_once('boards/about.php');
|
105 |
+
?>
|
106 |
+
<?php
|
107 |
+
/**
|
108 |
+
* Nonce field
|
109 |
+
* */
|
110 |
+
wp_nonce_field('apsc_settings_action', 'apsc_settings_nonce');
|
111 |
+
?>
|
112 |
+
<div id="optionsframework-submit" class="ap-settings-submit">
|
113 |
+
<input type="submit" class="button button-primary" value="Save all changes" name="ap_settings_submit"/>
|
114 |
+
<?php
|
115 |
+
$nonce = wp_create_nonce('apsc-restore-default-nonce');
|
116 |
+
$cache_nonce = wp_create_nonce('apsc-cache-nonce');
|
117 |
+
?>
|
118 |
+
<a href="<?php echo admin_url() . 'admin-post.php?action=apsc_restore_default&_wpnonce=' . $nonce; ?>" onclick="return confirm('<?php _e('Are you sure you want to restore default settings?', 'accesspress-social-counter'); ?>')"><input type="button" value="<?php _e('Restore Default Settings','accesspress-social-counter');?>" class="ap-reset-button button button-primary"/></a>
|
119 |
+
<a href="<?php echo admin_url() . 'admin-post.php?action=apsc_delete_cache&_wpnonce=' . $cache_nonce; ?>" onclick="return confirm('<?php _e('Are you sure you want to delete cache?', 'accesspress-social-counter'); ?>')"><input type="button" value="<?php _e('Delete Cache','accesspress-social-counter');?>" class="ap-reset-button button button-primary"/></a>
|
120 |
+
</div>
|
121 |
+
</form>
|
122 |
+
</div><!--optionsframework-->
|
123 |
+
</div>
|
124 |
+
</div>
|
125 |
|
126 |
+
</div>
|
127 |
+
<div class="apsc-promoFloat">
|
128 |
+
<img src="<?php echo SC_IMAGE_DIR . '/promo-top.png' ?>" alt="promo-top" />
|
129 |
+
<div class="apsc-promo-buttons">
|
130 |
+
<a href="http://demo.accesspressthemes.com/wordpress-plugins/accesspress-social-pro" target="_blank"><img src="<?php echo SC_IMAGE_DIR . '/demo-btn.png' ?>" alt="demo link" /></a>
|
131 |
+
<a href="http://codecanyon.net/item/accesspress-social-pro/10429645?ref=AccessKeys" target="_blank"><img src="<?php echo SC_IMAGE_DIR . '/upgrade-btn.png' ?>" alt="upgrade link" /></a>
|
132 |
+
</div>
|
133 |
+
<img src="<?php echo SC_IMAGE_DIR . '/promo-bottom.png' ?>" alt="promo-bottom" />
|
134 |
+
<div class="apsc-promo-buttons">
|
135 |
+
<a href="http://demo.accesspressthemes.com/wordpress-plugins/accesspress-social-pro" target="_blank"><img src="<?php echo SC_IMAGE_DIR . '/demo-btn.png' ?>" alt="demo link" /></a>
|
136 |
+
<a href="http://codecanyon.net/item/accesspress-social-pro/10429645?ref=AccessKeys" target="_blank"><img src="<?php echo SC_IMAGE_DIR . '/upgrade-btn.png' ?>" alt="upgrade link" /></a>
|
137 |
+
</div>
|
138 |
+
</div>
|
139 |
+
<div class="clear"></div>
|
140 |
</div>
|
|
|
|
|
141 |
</div><!--div class wrap-->
|
inc/frontend/api.php
CHANGED
@@ -10,9 +10,6 @@ switch ( $social_media ) {
|
|
10 |
case 'twitter':
|
11 |
include(SC_PATH . 'inc/frontend/social_network/extract_count/twitter.php');
|
12 |
break;
|
13 |
-
case 'googlePlus':
|
14 |
-
include(SC_PATH . 'inc/frontend/social_network/extract_count/googlePlus.php');
|
15 |
-
break;
|
16 |
case 'instagram':
|
17 |
include(SC_PATH . 'inc/frontend/social_network/extract_count/instagram.php');
|
18 |
break;
|
10 |
case 'twitter':
|
11 |
include(SC_PATH . 'inc/frontend/social_network/extract_count/twitter.php');
|
12 |
break;
|
|
|
|
|
|
|
13 |
case 'instagram':
|
14 |
include(SC_PATH . 'inc/frontend/social_network/extract_count/instagram.php');
|
15 |
break;
|
inc/frontend/shortcode.php
CHANGED
@@ -23,9 +23,6 @@ $format = isset( $apsc_settings[ 'counter_format' ] ) ? esc_attr( $apsc_settings
|
|
23 |
case 'twitter':
|
24 |
include(SC_PATH . 'inc/frontend/social_network/div/twitter.php');
|
25 |
break;
|
26 |
-
case 'googlePlus':
|
27 |
-
include(SC_PATH . 'inc/frontend/social_network/div/googlePlus.php');
|
28 |
-
break;
|
29 |
case 'instagram':
|
30 |
include(SC_PATH . 'inc/frontend/social_network/div/instagram.php');
|
31 |
break;
|
23 |
case 'twitter':
|
24 |
include(SC_PATH . 'inc/frontend/social_network/div/twitter.php');
|
25 |
break;
|
|
|
|
|
|
|
26 |
case 'instagram':
|
27 |
include(SC_PATH . 'inc/frontend/social_network/div/instagram.php');
|
28 |
break;
|
inc/frontend/social_network/div/googlePlus.php
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
3 |
-
|
4 |
-
$social_profile_url = 'https://plus.google.com/' . $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'page_id' ];
|
5 |
-
?>
|
6 |
-
|
7 |
-
<a class="apsc-google-plus-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank" <?php do_action( 'apsc_googlePlus_link' ); ?>>
|
8 |
-
<div class="apsc-inner-block">
|
9 |
-
<span class="social-icon"><i class="apsc-googlePlus fa fa-google-plus"></i><span class="media-name">google+</span></span>
|
10 |
-
<span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
|
11 |
-
</div>
|
12 |
-
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/frontend/social_network/extract_count/googlePlus.php
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
3 |
-
|
4 |
-
$social_profile_url = 'https://plus.google.com/' . $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'page_id' ];
|
5 |
-
$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';
|
6 |
-
|
7 |
-
$googlePlus_count = get_transient( 'apsc_googlePlus' );
|
8 |
-
if ( false === $googlePlus_count ) {
|
9 |
-
$api_url = 'https://www.googleapis.com/plus/v1/people/' . $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'page_id' ] . '?key=' . $apsc_settings[ 'social_profile' ][ 'googlePlus' ][ 'api_key' ];
|
10 |
-
$params = array(
|
11 |
-
'sslverify' => false,
|
12 |
-
'timeout' => 60
|
13 |
-
);
|
14 |
-
$connection = wp_remote_get( $api_url, $params );
|
15 |
-
|
16 |
-
if ( is_wp_error( $connection ) ) {
|
17 |
-
$count = $default_count;
|
18 |
-
} else {
|
19 |
-
$_data = json_decode( $connection[ 'body' ], true );
|
20 |
-
|
21 |
-
if ( isset( $_data[ 'circledByCount' ] ) ) {
|
22 |
-
$count = (intval( $_data[ 'circledByCount' ] ));
|
23 |
-
set_transient( 'apsc_googlePlus', $count, $cache_period );
|
24 |
-
} else {
|
25 |
-
$count = $default_count;
|
26 |
-
}
|
27 |
-
}
|
28 |
-
} else {
|
29 |
-
$count = $googlePlus_count;
|
30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.2.1
|
7 |
-
Stable tag: 1.8.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -20,7 +20,7 @@ You can select the social media profiles you want to activate, enter details of
|
|
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,
|
24 |
|
25 |
Just get it done in a few minutes!
|
26 |
|
@@ -33,7 +33,7 @@ Note: If Instagram followers count is returning 0, it is due to change in the in
|
|
33 |
= Free Features: =
|
34 |
|
35 |
* <strong>Beautifully designed 5 themes to select from.</strong> More available in Pro versoin.
|
36 |
-
* <strong>Major 7 social media included </strong>(Facebook, Twitter,
|
37 |
* <strong>Latest use of APIs to fetch data</strong>
|
38 |
* <strong>Auto updates on all APIs</strong>
|
39 |
* <strong>Option to select which social media profile to show</strong>
|
@@ -52,7 +52,7 @@ Note: If Instagram followers count is returning 0, it is due to change in the in
|
|
52 |
[youtube https://www.youtube.com/watch?v=96E67Z6AKM8]
|
53 |
|
54 |
= Premium Features: =
|
55 |
-
★ Major 18 social media included(Facebook, Twitter,
|
56 |
SoundCloud, Dribbble, Youtube, Steam, Vimeo, Pinterest, Forrst, VK,
|
57 |
Flickr, Behance, Github, Envato,Posts, Comments)
|
58 |
|
@@ -90,7 +90,6 @@ Note: If Instagram followers count is returning 0, it is due to change in the in
|
|
90 |
* <strong>Facebook link</strong>: https://www.facebook.com/AccessPressThemes
|
91 |
|
92 |
|
93 |
-
|
94 |
For a easy installation guide checkout the Installation tab above.
|
95 |
|
96 |
For complete information and documentation regarding plugin,please visit below links.
|
@@ -148,6 +147,13 @@ Once you install the plugin , you can check some general documentation about how
|
|
148 |
5. Backend Cache Settings Section
|
149 |
|
150 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
= 1.8.1 =
|
152 |
* Bug fix ralated to Facebook link
|
153 |
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 5.2.1
|
7 |
+
Stable tag: 1.8.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
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, Instagram, Youtube, Sound Cloud and Dribbble along with Posts and Comments count.
|
24 |
|
25 |
Just get it done in a few minutes!
|
26 |
|
33 |
= Free Features: =
|
34 |
|
35 |
* <strong>Beautifully designed 5 themes to select from.</strong> More available in Pro versoin.
|
36 |
+
* <strong>Major 7 social media included </strong>(Facebook, Twitter, Instagram, Youtube, Sound Cloud and Dribbble). More available in Pro versoin.
|
37 |
* <strong>Latest use of APIs to fetch data</strong>
|
38 |
* <strong>Auto updates on all APIs</strong>
|
39 |
* <strong>Option to select which social media profile to show</strong>
|
52 |
[youtube https://www.youtube.com/watch?v=96E67Z6AKM8]
|
53 |
|
54 |
= Premium Features: =
|
55 |
+
★ Major 18 social media included(Facebook, Twitter, Instagram,
|
56 |
SoundCloud, Dribbble, Youtube, Steam, Vimeo, Pinterest, Forrst, VK,
|
57 |
Flickr, Behance, Github, Envato,Posts, Comments)
|
58 |
|
90 |
* <strong>Facebook link</strong>: https://www.facebook.com/AccessPressThemes
|
91 |
|
92 |
|
|
|
93 |
For a easy installation guide checkout the Installation tab above.
|
94 |
|
95 |
For complete information and documentation regarding plugin,please visit below links.
|
147 |
5. Backend Cache Settings Section
|
148 |
|
149 |
== Changelog ==
|
150 |
+
|
151 |
+
= 1.8.3 =
|
152 |
+
* Bug fix related to Google+
|
153 |
+
|
154 |
+
= 1.8.2 =
|
155 |
+
* Removed Google+ from the plugin
|
156 |
+
|
157 |
= 1.8.1 =
|
158 |
* Bug fix ralated to Facebook link
|
159 |
|