Version Description
- Refinements in the plugin to avoid trademark infringement
Download this release
Release Info
Developer | Access Keys |
Plugin | Social Counter for WordPress – AccessPress Social Counter |
Version | 1.8.4 |
Comparing to | |
See all releases |
Code changes from version 1.8.2 to 1.8.4
- accesspress-social-counter.php +389 -425
- css/backend.css +97 -7
- images/upgrade-to-pro/upgrade-to-pro-feature.png +0 -0
- images/upgrade-to-pro/upgrade-to-pro.png +0 -0
- inc/backend/boards/about.php +66 -50
- inc/backend/boards/cache-settings.php +12 -9
- inc/backend/boards/display-settings.php +6 -2
- inc/backend/boards/how-to-use.php +2 -2
- inc/backend/boards/save-button.php +13 -0
- inc/backend/boards/social-profiles.php +3 -1
- inc/backend/settings.php +94 -81
- readme.txt +9 -4
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
|
@@ -15,450 +15,414 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
|
15 |
* License: GPL2
|
16 |
*/
|
17 |
|
18 |
-
/**
|
19 |
-
* Declartion of necessary constants for plugin
|
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 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
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 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
* Adds Shortcode
|
185 |
-
*/
|
186 |
-
function apsc_shortcode( $atts ){
|
187 |
-
ob_start();
|
188 |
-
include('inc/frontend/shortcode.php');
|
189 |
-
$html = ob_get_contents();
|
190 |
-
ob_get_clean();
|
191 |
-
return $html;
|
192 |
-
}
|
193 |
-
|
194 |
-
/**
|
195 |
-
* Clears the counter cache
|
196 |
-
*/
|
197 |
-
function apsc_delete_cache(){
|
198 |
-
if ( ! empty( $_GET ) && wp_verify_nonce( $_GET[ '_wpnonce' ], 'apsc-cache-nonce' ) ) {
|
199 |
-
$transient_array = array( 'apsc_facebook', 'apsc_twitter', 'apsc_youtube', 'apsc_instagram','apsc_soundcloud', 'apsc_dribbble', 'apsc_posts', 'apsc_comments' );
|
200 |
-
foreach ( $transient_array as $transient ) {
|
201 |
-
delete_transient( $transient );
|
202 |
-
}
|
203 |
-
$_SESSION[ 'apsc_message' ] = __( 'Cache Deleted Successfully', 'accesspress-social-counter' );
|
204 |
-
wp_redirect( admin_url() . 'admin.php?page=ap-social-counter' );
|
205 |
-
}
|
206 |
-
}
|
207 |
-
|
208 |
-
/**
|
209 |
-
*
|
210 |
-
* @param type $user
|
211 |
-
* @param type $consumer_key
|
212 |
-
* @param type $consumer_secret
|
213 |
-
* @param type $oauth_access_token
|
214 |
-
* @param type $oauth_access_token_secret
|
215 |
-
* @return string
|
216 |
-
*/
|
217 |
-
function authorization( $user, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret ){
|
218 |
-
$query = 'screen_name=' . $user;
|
219 |
-
$signature = $this -> signature( $query, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret );
|
220 |
-
|
221 |
-
return $this -> header( $signature );
|
222 |
-
}
|
223 |
-
|
224 |
-
/**
|
225 |
-
*
|
226 |
-
* @param type $url
|
227 |
-
* @param type $query
|
228 |
-
* @param type $method
|
229 |
-
* @param type $params
|
230 |
-
* @return type string
|
231 |
-
*/
|
232 |
-
function signature_base_string( $url, $query, $method, $params ){
|
233 |
-
$return = array();
|
234 |
-
ksort( $params );
|
235 |
-
|
236 |
-
foreach ( $params as $key => $value ) {
|
237 |
-
$return[] = $key . '=' . $value;
|
238 |
-
}
|
239 |
-
|
240 |
-
return $method . "&" . rawurlencode( $url ) . '&' . rawurlencode( implode( '&', $return ) ) . '%26' . rawurlencode( $query );
|
241 |
-
}
|
242 |
-
|
243 |
-
/**
|
244 |
-
*
|
245 |
-
* @param type $query
|
246 |
-
* @param type $consumer_key
|
247 |
-
* @param type $consumer_secret
|
248 |
-
* @param type $oauth_access_token
|
249 |
-
* @param type $oauth_access_token_secret
|
250 |
-
* @return type array
|
251 |
-
*/
|
252 |
-
function signature( $query, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret ){
|
253 |
-
$oauth = array(
|
254 |
-
'oauth_consumer_key' => $consumer_key,
|
255 |
-
'oauth_nonce' => hash_hmac( 'sha1', time(), true ),
|
256 |
-
'oauth_signature_method' => 'HMAC-SHA1',
|
257 |
-
'oauth_token' => $oauth_access_token,
|
258 |
-
'oauth_timestamp' => time(),
|
259 |
-
'oauth_version' => '1.0'
|
260 |
-
);
|
261 |
-
$api_url = 'https://api.twitter.com/1.1/users/show.json';
|
262 |
-
$base_info = $this -> signature_base_string( $api_url, $query, 'GET', $oauth );
|
263 |
-
$composite_key = rawurlencode( $consumer_secret ) . '&' . rawurlencode( $oauth_access_token_secret );
|
264 |
-
$oauth_signature = base64_encode( hash_hmac( 'sha1', $base_info, $composite_key, true ) );
|
265 |
-
$oauth[ 'oauth_signature' ] = $oauth_signature;
|
266 |
-
|
267 |
-
return $oauth;
|
268 |
-
}
|
269 |
-
|
270 |
-
/**
|
271 |
-
* Build the header.
|
272 |
-
*
|
273 |
-
* @param array $signature OAuth signature.
|
274 |
-
*
|
275 |
-
* @return string OAuth Authorization.
|
276 |
-
*/
|
277 |
-
public function header( $signature ){
|
278 |
-
$return = 'OAuth ';
|
279 |
-
$values = array();
|
280 |
-
|
281 |
-
foreach ( $signature as $key => $value ) {
|
282 |
-
$values[] = $key . '="' . rawurlencode( $value ) . '"';
|
283 |
-
}
|
284 |
-
|
285 |
-
$return .= implode( ', ', $values );
|
286 |
-
|
287 |
-
return $return;
|
288 |
-
}
|
289 |
-
|
290 |
-
/**
|
291 |
-
* Returns twitter count
|
292 |
-
*/
|
293 |
-
function get_twitter_count(){
|
294 |
-
$apsc_settings = $this -> apsc_settings;
|
295 |
-
$user = $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'username' ];
|
296 |
-
$api_url = 'https://api.twitter.com/1.1/users/show.json';
|
297 |
-
$params = array(
|
298 |
-
'method' => 'GET',
|
299 |
-
'sslverify' => false,
|
300 |
-
'timeout' => 60,
|
301 |
-
'headers' => array(
|
302 |
-
'Content-Type' => 'application/x-www-form-urlencoded',
|
303 |
-
'Authorization' => $this -> authorization(
|
304 |
-
$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' ]
|
305 |
-
)
|
306 |
-
)
|
307 |
-
);
|
308 |
-
|
309 |
-
$connection = wp_remote_get( $api_url . '?screen_name=' . $user, $params );
|
310 |
-
if ( is_wp_error( $connection ) ) {
|
311 |
$count = 0;
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
if ( is_wp_error( $access_token ) || ( isset( $access_token[ 'response' ][ 'code' ] ) && 200 != $access_token[ 'response' ][ 'code' ] ) ) {
|
413 |
-
return '';
|
414 |
-
} else {
|
415 |
-
return sanitize_text_field( $access_token[ 'body' ] );
|
416 |
-
}
|
417 |
-
}
|
418 |
-
|
419 |
-
/**
|
420 |
-
* Get New Facebook Count
|
421 |
-
* */
|
422 |
-
function new_fb_count(){
|
423 |
-
$apsc_settings = $this -> apsc_settings;
|
424 |
-
$facebook_method = ( isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] ) && $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] != '' ) ? $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] : '2';
|
425 |
-
if ( $facebook_method == '1' ) {
|
426 |
-
$access_token = $this -> get_fb_access_token();
|
427 |
-
$access_token = json_decode( $access_token );
|
428 |
-
$access_token = $access_token -> access_token;
|
429 |
-
$api_url = 'https://graph.facebook.com/v3.0/'; //not working
|
430 |
-
//$api_url = 'https://graph.facebook.com/v2.8/'; // not working
|
431 |
-
//$api_url = 'https://graph.facebook.com/v3.2/'; // not working
|
432 |
$url = sprintf(
|
433 |
-
|
434 |
);
|
435 |
-
|
436 |
-
$
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
$connection = wp_remote_get( $url, array( 'timeout' => 60 ) );
|
449 |
-
|
450 |
-
if ( is_wp_error( $connection ) || ( isset( $connection[ 'response' ][ 'code' ] ) && 200 != $connection[ 'response' ][ 'code' ] ) ) {
|
451 |
$count = 0;
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
}
|
459 |
-
}
|
460 |
-
return $count;
|
461 |
-
}
|
462 |
-
}
|
463 |
-
$sc_object = new SC_Class();
|
464 |
}
|
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.4
|
10 |
* Author: AccessPress Themes
|
11 |
* Author URI: http://accesspressthemes.com
|
12 |
* Text Domain: aps-counter
|
15 |
* License: GPL2
|
16 |
*/
|
17 |
|
|
|
|
|
|
|
18 |
|
19 |
if ( ! defined( 'SC_IMAGE_DIR' ) ) {
|
20 |
+
define( 'SC_IMAGE_DIR', plugin_dir_url( __FILE__ ) . 'images' );
|
21 |
}
|
22 |
+
|
23 |
if ( ! defined( 'SC_JS_DIR' ) ) {
|
24 |
+
define( 'SC_JS_DIR', plugin_dir_url( __FILE__ ) . 'js' );
|
25 |
}
|
26 |
+
|
27 |
if ( ! defined( 'SC_CSS_DIR' ) ) {
|
28 |
+
define( 'SC_CSS_DIR', plugin_dir_url( __FILE__ ) . 'css' );
|
29 |
}
|
30 |
+
|
31 |
if ( ! defined( 'SC_VERSION' ) ) {
|
32 |
+
define( 'SC_VERSION', '1.8.4' );
|
33 |
}
|
34 |
+
|
35 |
if ( ! defined( 'SC_PATH' ) ) {
|
36 |
+
define( 'SC_PATH', plugin_dir_path( __FILE__ ) );
|
37 |
}
|
38 |
+
|
39 |
+
defined('APSC_LITE_PLUGIN_NAME') or define('APSC_LITE_PLUGIN_NAME', 'AccessPress Social Counter');
|
40 |
+
defined('APSC_LITE_DEMO') or define('APSC_LITE_DEMO', 'http://demo.accesspressthemes.com/wordpress-plugins/accesspress-social-counter');
|
41 |
+
defined('APSC_LITE_DOC') or define('APSC_LITE_DOC', 'https://accesspressthemes.com/documentation/accesspress-social-counter/');
|
42 |
+
defined('APSC_LITE_DETAIL') or define('APSC_LITE_DETAIL', 'https://accesspressthemes.com/wordpress-plugins/accesspress-social-counter/');
|
43 |
+
defined('APSC_LITE_RATING') or define('APSC_LITE_RATING', 'https://wordpress.org/support/plugin/accesspress-social-counter/reviews/#new-post');
|
44 |
+
|
45 |
+
defined('APSC_PRO_PLUGIN_NAME') or define('APSC_PRO_PLUGIN_NAME', 'AccessPress Social Pro');
|
46 |
+
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
|
47 |
+
');
|
48 |
+
defined('APSC_PRO_DEMO') or define('APSC_PRO_DEMO', 'http://demo.accesspressthemes.com/wordpress-plugins/accesspress-social-pro');
|
49 |
+
defined('APSC_PRO_DETAIL') or define('APSC_PRO_DETAIL', 'https://accesspressthemes.com/wordpress-plugins/accesspress-social-pro/');
|
50 |
+
|
51 |
+
|
52 |
/**
|
53 |
* Register of widgets
|
54 |
* */
|
55 |
include_once('inc/backend/widget.php');
|
56 |
if ( ! class_exists( 'SC_Class' ) ) {
|
57 |
|
58 |
+
class SC_Class{
|
59 |
+
|
60 |
+
var $apsc_settings;
|
61 |
+
|
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
|
67 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'register_admin_assets' ) ); //registers admin assests such as js and css
|
68 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'register_frontend_assets' ) ); //registers js and css for frontend
|
69 |
+
add_action( 'admin_post_apsc_settings_action', array( $this, 'apsc_settings_action' ) ); //recieves the posted values from settings form
|
70 |
+
add_action( 'admin_post_apsc_restore_default', array( $this, 'apsc_restore_default' ) ); //restores default settings;
|
71 |
+
add_action( 'widgets_init', array( $this, 'register_apsc_widget' ) ); //registers the widget
|
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 |
+
if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'apsc-documentation' ) {
|
84 |
+
wp_redirect( APSC_LITE_DOC );
|
85 |
+
exit();
|
86 |
+
}
|
87 |
+
|
88 |
+
if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'apsc-premium' ) {
|
89 |
+
wp_redirect( APSC_PRO_LINK );
|
90 |
+
exit();
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
function apsc_plugin_row_meta( $links, $file ){
|
95 |
+
if ( strpos( $file, 'accesspress-social-counter.php' ) !== false ) {
|
96 |
+
$new_links = array(
|
97 |
+
'demo' => '<a href="'.APSC_LITE_DEMO.'" target="_blank"><span class="dashicons dashicons-welcome-view-site"></span>Live Demo</a>',
|
98 |
+
'doc' => '<a href="'.APSC_LITE_DOC.'" target="_blank"><span class="dashicons dashicons-media-document"></span>Documentation</a>',
|
99 |
+
'support' => '<a href="http://accesspressthemes.com/support" target="_blank"><span class="dashicons dashicons-admin-users"></span>Support</a>',
|
100 |
+
'pro' => '<a href="'.APSC_PRO_LINK.'" target="_blank"><span class="dashicons dashicons-cart"></span>Premium version</a>'
|
101 |
+
);
|
102 |
+
$links = array_merge( $links, $new_links );
|
103 |
+
}
|
104 |
+
return $links;
|
105 |
+
}
|
106 |
+
|
107 |
+
function apsc_admin_footer_text( $text ){
|
108 |
+
global $post;
|
109 |
+
if ( isset($_GET['page']) && $_GET['page'] === 'ap-social-counter') {
|
110 |
+
$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 <a href="' . APSC_PRO_LINK . '" target="_blank">' . APSC_PRO_PLUGIN_NAME . '</a> - more features, more power!';
|
111 |
+
return $text;
|
112 |
+
} else {
|
113 |
+
return $text;
|
114 |
+
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
118 |
+
function plugin_text_domain(){
|
119 |
+
load_plugin_textdomain( 'accesspress-social-counter', false, basename( dirname( __FILE__ ) ) . '/languages/' );
|
120 |
+
}
|
121 |
+
|
122 |
+
function load_default_settings(){
|
123 |
+
if ( ! get_option( 'apsc_settings' ) ) {
|
124 |
+
$apsc_settings = $this -> get_default_settings();
|
125 |
+
update_option( 'apsc_settings', $apsc_settings );
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
|
130 |
+
function add_sc_menu(){
|
131 |
+
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' );
|
132 |
+
|
133 |
+
add_submenu_page('ap-social-counter', __('Documentation', 'accesspress-social-counter'), __('Documentation', 'accesspress-social-counter'), 'manage_options', 'apsc-documentation', '__return_false', null, 9);
|
134 |
+
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);
|
135 |
+
}
|
136 |
+
|
137 |
+
function sc_settings(){
|
138 |
+
include('inc/backend/settings.php');
|
139 |
+
}
|
140 |
+
|
141 |
+
function register_admin_assets(){
|
142 |
+
if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'ap-social-counter' ) {
|
143 |
+
wp_enqueue_style( 'sc-admin-css', SC_CSS_DIR . '/backend.css', array(), SC_VERSION );
|
144 |
+
wp_enqueue_script( 'sc-admin-js', SC_JS_DIR . '/backend.js', array( 'jquery', 'jquery-ui-sortable' ), SC_VERSION );
|
145 |
+
wp_enqueue_script( 'sc-wpac-time-js', SC_JS_DIR . '/wpac-time.js', array( 'jquery' ), SC_VERSION ); // Third Party API for Facebook followers count
|
146 |
+
wp_enqueue_script( 'sc-wpac-js', SC_JS_DIR . '/wpac.js', array( 'jquery' ), SC_VERSION ); // Third Party API for Facebook followers count
|
147 |
+
}
|
148 |
+
wp_enqueue_style( 'fontawesome-css', SC_CSS_DIR . '/font-awesome.min.css', false, SC_VERSION );
|
149 |
+
}
|
150 |
+
|
151 |
+
function register_frontend_assets(){
|
152 |
+
$apsc_settings = $this -> apsc_settings;
|
153 |
+
$enable_font_css = (isset( $apsc_settings[ 'disable_font_css' ] ) && $apsc_settings[ 'disable_font_css' ] == 0) ? true : false;
|
154 |
+
$enable_frontend_css = (isset( $apsc_settings[ 'disable_frontend_css' ] ) && $apsc_settings[ 'disable_frontend_css' ] == 0) ? true : false;
|
155 |
+
if ( $enable_font_css ) {
|
156 |
+
wp_enqueue_style( 'fontawesome-css', SC_CSS_DIR . '/font-awesome.min.css', false, SC_VERSION );
|
157 |
+
}
|
158 |
+
if ( $enable_frontend_css ) {
|
159 |
+
wp_enqueue_style( 'apsc-frontend-css', SC_CSS_DIR . '/frontend.css', array(), SC_VERSION );
|
160 |
+
}
|
161 |
+
}
|
162 |
+
|
163 |
+
function apsc_settings_action(){
|
164 |
+
if ( ! empty( $_POST ) && wp_verify_nonce( $_POST[ 'apsc_settings_nonce' ], 'apsc_settings_action' ) ) {
|
165 |
+
include('inc/backend/save-settings.php');
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
function print_array( $array ){
|
170 |
+
echo "<pre>";
|
171 |
+
print_r( $array );
|
172 |
+
echo "</pre>";
|
173 |
+
}
|
174 |
+
|
175 |
+
function apsc_restore_default(){
|
176 |
+
if ( ! empty( $_GET ) && wp_verify_nonce( $_GET[ '_wpnonce' ], 'apsc-restore-default-nonce' ) ) {
|
177 |
+
$apsc_settings = $this -> get_default_settings();
|
178 |
+
update_option( 'apsc_settings', $apsc_settings );
|
179 |
+
$_SESSION[ 'apsc_message' ] = __( 'Default Settings Restored Successfully', 'accesspress-social-counter' );
|
180 |
+
wp_redirect( admin_url() . 'admin.php?page=ap-social-counter' );
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
function get_default_settings(){
|
185 |
+
$apsc_settings = array( 'social_profile' => array( 'facebook' => array( 'page_id' => '' ),
|
186 |
+
'twitter' => array( 'username' => '', 'consumer_key' => '',
|
187 |
+
'consumer_secret' => '',
|
188 |
+
'access_token' => '',
|
189 |
+
'access_token_secret' => '' ),
|
190 |
+
'instagram' => array('username' => '',
|
191 |
+
'access_token' => '',
|
192 |
+
'user_id' => '' ),
|
193 |
+
'youtube' => array( 'username' => '',
|
194 |
+
'channel_url' => '' ),
|
195 |
+
'soundcloud' => array( 'username' => '',
|
196 |
+
'client_id' => '' ),
|
197 |
+
'dribbble' => array( 'username' => '' ),
|
198 |
+
),
|
199 |
+
'profile_order' => array( 'facebook', 'twitter', 'instagram', 'youtube', 'soundcloud', 'dribbble', 'posts', 'comments' ),
|
200 |
+
'social_profile_theme' => 'theme-1',
|
201 |
+
'counter_format' => 'comma',
|
202 |
+
'cache_period' => '',
|
203 |
+
'disable_font_css' => 0,
|
204 |
+
'disable_frontend_css' => 0
|
205 |
+
);
|
206 |
+
return $apsc_settings;
|
207 |
+
}
|
208 |
+
|
209 |
+
function register_apsc_widget(){
|
210 |
+
register_widget( 'APSC_Widget' );
|
211 |
+
}
|
212 |
+
|
213 |
+
function apsc_shortcode( $atts ){
|
214 |
+
ob_start();
|
215 |
+
include('inc/frontend/shortcode.php');
|
216 |
+
$html = ob_get_contents();
|
217 |
+
ob_get_clean();
|
218 |
+
return $html;
|
219 |
+
}
|
220 |
+
|
221 |
+
function apsc_delete_cache(){
|
222 |
+
if ( ! empty( $_GET ) && wp_verify_nonce( $_GET[ '_wpnonce' ], 'apsc-cache-nonce' ) ) {
|
223 |
+
$transient_array = array( 'apsc_facebook', 'apsc_twitter', 'apsc_youtube', 'apsc_instagram','apsc_soundcloud', 'apsc_dribbble', 'apsc_posts', 'apsc_comments' );
|
224 |
+
foreach ( $transient_array as $transient ) {
|
225 |
+
delete_transient( $transient );
|
226 |
}
|
227 |
+
$_SESSION[ 'apsc_message' ] = __( 'Cache Deleted Successfully', 'accesspress-social-counter' );
|
228 |
+
wp_redirect( admin_url() . 'admin.php?page=ap-social-counter' );
|
229 |
+
}
|
230 |
+
}
|
231 |
+
|
232 |
+
function authorization( $user, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret ){
|
233 |
+
$query = 'screen_name=' . $user;
|
234 |
+
$signature = $this -> signature( $query, $consumer_key, $consumer_secret, $oauth_access_token, $oauth_access_token_secret );
|
235 |
+
return $this -> header( $signature );
|
236 |
+
}
|
237 |
+
|
238 |
+
function signature_base_string( $url, $query, $method, $params ){
|
239 |
+
$return = array();
|
240 |
+
ksort( $params );
|
241 |
+
|
242 |
+
foreach ( $params as $key => $value ) {
|
243 |
+
$return[] = $key . '=' . $value;
|
244 |
+
}
|
245 |
+
|
246 |
+
return $method . "&" . rawurlencode( $url ) . '&' . rawurlencode( implode( '&', $return ) ) . '%26' . rawurlencode( $query );
|
247 |
+
}
|
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 |
+
return $oauth;
|
264 |
+
}
|
265 |
+
|
266 |
+
public function header( $signature ){
|
267 |
+
$return = 'OAuth ';
|
268 |
+
$values = array();
|
269 |
+
|
270 |
+
foreach ( $signature as $key => $value ) {
|
271 |
+
$values[] = $key . '="' . rawurlencode( $value ) . '"';
|
272 |
+
}
|
273 |
+
|
274 |
+
$return .= implode( ', ', $values );
|
275 |
+
|
276 |
+
return $return;
|
277 |
+
}
|
278 |
+
|
279 |
+
|
280 |
+
function get_twitter_count(){
|
281 |
+
$apsc_settings = $this -> apsc_settings;
|
282 |
+
$user = $apsc_settings[ 'social_profile' ][ 'twitter' ][ 'username' ];
|
283 |
+
$api_url = 'https://api.twitter.com/1.1/users/show.json';
|
284 |
+
$params = array(
|
285 |
+
'method' => 'GET',
|
286 |
+
'sslverify' => false,
|
287 |
+
'timeout' => 60,
|
288 |
+
'headers' => array(
|
289 |
+
'Content-Type' => 'application/x-www-form-urlencoded',
|
290 |
+
'Authorization' => $this -> authorization(
|
291 |
+
$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' ]
|
292 |
+
)
|
293 |
+
)
|
294 |
+
);
|
295 |
+
|
296 |
+
$connection = wp_remote_get( $api_url . '?screen_name=' . $user, $params );
|
297 |
+
if ( is_wp_error( $connection ) ) {
|
298 |
+
$count = 0;
|
299 |
+
} else {
|
300 |
+
$_data = json_decode( $connection[ 'body' ], true );
|
301 |
+
if ( isset( $_data[ 'followers_count' ] ) ) {
|
302 |
+
$count = intval( $_data[ 'followers_count' ] );
|
303 |
+
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
$count = 0;
|
305 |
+
}
|
306 |
+
}
|
307 |
+
return $count;
|
308 |
+
}
|
309 |
+
|
310 |
+
function get_formatted_count( $count, $format ){
|
311 |
+
if ( $count == '' ) {
|
312 |
+
return '';
|
313 |
+
}
|
314 |
+
switch ( $format ) {
|
315 |
+
case 'comma':
|
316 |
+
$count = number_format( $count );
|
317 |
+
break;
|
318 |
+
case 'short':
|
319 |
+
$count = $this -> abreviateTotalCount( $count );
|
320 |
+
break;
|
321 |
+
default:
|
322 |
+
break;
|
323 |
+
}
|
324 |
+
return $count;
|
325 |
+
}
|
326 |
+
|
327 |
+
function abreviateTotalCount( $value ){
|
328 |
+
|
329 |
+
$abbreviations = array( 12 => 'T', 9 => 'B', 6 => 'M', 3 => 'K', 0 => '' );
|
330 |
+
|
331 |
+
foreach ( $abbreviations as $exponent => $abbreviation ) {
|
332 |
+
|
333 |
+
if ( $value >= pow( 10, $exponent ) ) {
|
334 |
+
return round( floatval( $value / pow( 10, $exponent ) ), 1 ) . $abbreviation;
|
335 |
+
}
|
336 |
+
}
|
337 |
+
}
|
338 |
+
|
339 |
+
function facebook_count( $url ){
|
340 |
+
|
341 |
+
$fql = "SELECT like_count ";
|
342 |
+
$fql .= " FROM link_stat WHERE url = '$url'";
|
343 |
+
|
344 |
+
$fqlURL = "https://api.facebook.com/method/fql.query?format=json&query=" . urlencode( $fql );
|
345 |
+
|
346 |
+
$response = wp_remote_get( $fqlURL );
|
347 |
+
$response = json_decode( $response[ 'body' ] );
|
348 |
+
if ( is_array( $response ) && isset( $response[ 0 ] -> like_count ) ) {
|
349 |
+
return $response[ 0 ] -> like_count;
|
350 |
+
} else {
|
351 |
+
$count = '0';
|
352 |
+
return $count;
|
353 |
+
}
|
354 |
+
}
|
355 |
+
|
356 |
+
function get_count( $social_media ){
|
357 |
+
include('inc/frontend/api.php');
|
358 |
+
return $count;
|
359 |
+
}
|
360 |
+
|
361 |
+
function apsc_count_shortcode( $atts ){
|
362 |
+
if ( isset( $atts[ 'social_media' ] ) ) {
|
363 |
+
$count = $this -> get_count( $atts[ 'social_media' ] );
|
364 |
+
if ( isset( $atts[ 'count_format' ] ) && $count != '' ) {
|
365 |
+
$count = $this -> get_formatted_count( $count, $atts[ 'count_format' ] );
|
366 |
+
}
|
367 |
+
return $count;
|
368 |
+
}
|
369 |
+
}
|
370 |
+
|
371 |
+
function get_fb_access_token(){
|
372 |
+
$apsc_settings = $this -> apsc_settings;
|
373 |
+
$api_url = 'https://graph.facebook.com/';
|
374 |
+
$url = sprintf(
|
375 |
+
'%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' ]
|
376 |
+
);
|
377 |
+
$access_token = wp_remote_get( $url, array( 'timeout' => 60 ) );
|
378 |
+
|
379 |
+
if ( is_wp_error( $access_token ) || ( isset( $access_token[ 'response' ][ 'code' ] ) && 200 != $access_token[ 'response' ][ 'code' ] ) ) {
|
380 |
+
return '';
|
381 |
+
} else {
|
382 |
+
return sanitize_text_field( $access_token[ 'body' ] );
|
383 |
+
}
|
384 |
+
}
|
385 |
+
|
386 |
+
function new_fb_count(){
|
387 |
+
$apsc_settings = $this -> apsc_settings;
|
388 |
+
$facebook_method = ( isset( $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] ) && $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] != '' ) ? $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'method' ] : '2';
|
389 |
+
if ( $facebook_method == '1' ) {
|
390 |
+
$access_token = $this -> get_fb_access_token();
|
391 |
+
$access_token = json_decode( $access_token );
|
392 |
+
$access_token = $access_token -> access_token;
|
393 |
+
$api_url = 'https://graph.facebook.com/v3.0/'; //not working
|
394 |
+
//$api_url = 'https://graph.facebook.com/v2.8/'; // not working
|
395 |
+
//$api_url = 'https://graph.facebook.com/v3.2/'; // not working
|
396 |
+
$url = sprintf(
|
397 |
+
'%s%s?fields=fan_count&access_token=%s', $api_url, $apsc_settings[ 'social_profile' ][ 'facebook' ][ 'page_id' ], $access_token
|
398 |
+
);
|
399 |
+
} else {
|
400 |
+
$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' ] : ' ';
|
401 |
+
$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' ] : ' ';
|
402 |
+
|
403 |
+
if ( $fb_access_token != '' && $fb_page_id != '' ) {
|
404 |
+
$api_url = 'https://graph.facebook.com/';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
$url = sprintf(
|
406 |
+
'%s%s?fields=fan_count&access_token=%s', $api_url, $fb_page_id, $fb_access_token
|
407 |
);
|
408 |
+
} else {
|
409 |
+
$url = 'https://graph.facebook.com/';
|
410 |
+
}
|
411 |
+
}
|
412 |
+
$connection = wp_remote_get( $url, array( 'timeout' => 60 ) );
|
413 |
+
|
414 |
+
if ( is_wp_error( $connection ) || ( isset( $connection[ 'response' ][ 'code' ] ) && 200 != $connection[ 'response' ][ 'code' ] ) ) {
|
415 |
+
$count = 0;
|
416 |
+
} else {
|
417 |
+
$_data = json_decode( $connection[ 'body' ], true );
|
418 |
+
if ( isset( $_data[ 'fan_count' ] ) ) {
|
419 |
+
$count = intval( $_data[ 'fan_count' ] );
|
420 |
+
} else {
|
|
|
|
|
|
|
421 |
$count = 0;
|
422 |
+
}
|
423 |
+
}
|
424 |
+
return $count;
|
425 |
+
}
|
426 |
+
}
|
427 |
+
$sc_object = new SC_Class();
|
|
|
|
|
|
|
|
|
|
|
|
|
428 |
}
|
css/backend.css
CHANGED
@@ -24,7 +24,7 @@ clear:both;
|
|
24 |
.apsc-settings-tabs > li:hover,
|
25 |
.apsc-tabs-trigger.apsc-active-tab {
|
26 |
background: none repeat scroll 0 0 #fff;
|
27 |
-
border-bottom: 1px solid #fff
|
28 |
border-radius: 4px 4px 0 0;
|
29 |
}
|
30 |
|
@@ -53,7 +53,8 @@ clear:both;
|
|
53 |
.apsc-option-field,
|
54 |
.apsc-fields-configurations {
|
55 |
display: inline-block;
|
56 |
-
width: calc(100% -
|
|
|
57 |
}
|
58 |
.apsc-each-config-wrapper {
|
59 |
vertical-align: top;
|
@@ -70,7 +71,10 @@ clear:both;
|
|
70 |
line-height: 1.6;
|
71 |
padding: 5px 0;
|
72 |
vertical-align: top;
|
73 |
-
width:
|
|
|
|
|
|
|
74 |
}
|
75 |
.apsc-option-field > input[type="text"],
|
76 |
.apsc-option-wrapper input[type="text"],
|
@@ -78,6 +82,7 @@ clear:both;
|
|
78 |
display: block;
|
79 |
height: 32px;
|
80 |
width: 320px;
|
|
|
81 |
}
|
82 |
.apsc-option-wrapper {
|
83 |
margin-bottom: 20px;
|
@@ -115,6 +120,9 @@ clear:both;
|
|
115 |
line-height: 1.6;
|
116 |
margin-left: 2px;
|
117 |
padding-top: 10px;
|
|
|
|
|
|
|
118 |
}
|
119 |
.apsc-option-note.apsc-option-width,
|
120 |
.apsc-pro-notes {
|
@@ -227,16 +235,20 @@ clear:both;
|
|
227 |
|
228 |
#optionsframework {
|
229 |
background: none repeat scroll 0 0 #fff;
|
230 |
-
max-width: 980px
|
231 |
width: 100%;
|
232 |
display: inline-block;
|
233 |
}
|
234 |
.apsc-tab-wrapper{
|
235 |
padding: 15px;
|
|
|
|
|
|
|
|
|
236 |
}
|
237 |
#optionsframework-submit {
|
238 |
-
background-color: #f1f1f1;
|
239 |
-
border-top: 1px solid #ddd
|
240 |
padding: 7px 10px;
|
241 |
}
|
242 |
#optionsframework h2 {
|
@@ -398,7 +410,7 @@ clear:both;
|
|
398 |
clear: both;
|
399 |
margin-bottom: 20px;
|
400 |
display: inline-block;
|
401 |
-
width:
|
402 |
text-align: center;
|
403 |
}
|
404 |
|
@@ -662,6 +674,11 @@ border: 1px solid #bbb;
|
|
662 |
width: 40%;
|
663 |
padding: 10px;
|
664 |
background: #fff;
|
|
|
|
|
|
|
|
|
|
|
665 |
}
|
666 |
|
667 |
.apsc-sortable li.ui-sortable-handle:hover {
|
@@ -780,4 +797,77 @@ span.product-title {
|
|
780 |
}
|
781 |
span.apsc-option-trigger {
|
782 |
font-weight: normal;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
783 |
}
|
24 |
.apsc-settings-tabs > li:hover,
|
25 |
.apsc-tabs-trigger.apsc-active-tab {
|
26 |
background: none repeat scroll 0 0 #fff;
|
27 |
+
/*border-bottom: 1px solid #fff;*/
|
28 |
border-radius: 4px 4px 0 0;
|
29 |
}
|
30 |
|
53 |
.apsc-option-field,
|
54 |
.apsc-fields-configurations {
|
55 |
display: inline-block;
|
56 |
+
width: -webkit-calc(100% - 250px);
|
57 |
+
width: calc(100% - 250px);
|
58 |
}
|
59 |
.apsc-each-config-wrapper {
|
60 |
vertical-align: top;
|
71 |
line-height: 1.6;
|
72 |
padding: 5px 0;
|
73 |
vertical-align: top;
|
74 |
+
width: 240px;
|
75 |
+
-webkit-box-sizing: border-box;
|
76 |
+
-moz-box-sizing: border-box;
|
77 |
+
box-sizing: border-box;
|
78 |
}
|
79 |
.apsc-option-field > input[type="text"],
|
80 |
.apsc-option-wrapper input[type="text"],
|
82 |
display: block;
|
83 |
height: 32px;
|
84 |
width: 320px;
|
85 |
+
max-width: 100%;
|
86 |
}
|
87 |
.apsc-option-wrapper {
|
88 |
margin-bottom: 20px;
|
120 |
line-height: 1.6;
|
121 |
margin-left: 2px;
|
122 |
padding-top: 10px;
|
123 |
+
max-width: 100%;
|
124 |
+
-ms-word-break: break-word;
|
125 |
+
word-break: break-word;
|
126 |
}
|
127 |
.apsc-option-note.apsc-option-width,
|
128 |
.apsc-pro-notes {
|
235 |
|
236 |
#optionsframework {
|
237 |
background: none repeat scroll 0 0 #fff;
|
238 |
+
/*max-width: 980px;*/
|
239 |
width: 100%;
|
240 |
display: inline-block;
|
241 |
}
|
242 |
.apsc-tab-wrapper{
|
243 |
padding: 15px;
|
244 |
+
word-break: break-word;
|
245 |
+
}
|
246 |
+
.apsc-settings-form iframe {
|
247 |
+
max-width: 100%;
|
248 |
}
|
249 |
#optionsframework-submit {
|
250 |
+
/*background-color: #f1f1f1;
|
251 |
+
border-top: 1px solid #ddd;*/
|
252 |
padding: 7px 10px;
|
253 |
}
|
254 |
#optionsframework h2 {
|
410 |
clear: both;
|
411 |
margin-bottom: 20px;
|
412 |
display: inline-block;
|
413 |
+
width: 32%;
|
414 |
text-align: center;
|
415 |
}
|
416 |
|
674 |
width: 40%;
|
675 |
padding: 10px;
|
676 |
background: #fff;
|
677 |
+
min-width: 200px;
|
678 |
+
}
|
679 |
+
|
680 |
+
.apsc-theme-image img {
|
681 |
+
max-width: 100%;
|
682 |
}
|
683 |
|
684 |
.apsc-sortable li.ui-sortable-handle:hover {
|
797 |
}
|
798 |
span.apsc-option-trigger {
|
799 |
font-weight: normal;
|
800 |
+
}
|
801 |
+
|
802 |
+
.apsc-add-set-wrapper {
|
803 |
+
display: flex;
|
804 |
+
-webkit-justify-content: space-between;
|
805 |
+
justify-content: space-between;
|
806 |
+
width: 100%;
|
807 |
+
}
|
808 |
+
|
809 |
+
.apsc-add-set-wrapper .apsc-panel {
|
810 |
+
width: -webkit-calc(100% - 320px);
|
811 |
+
width: calc(100% - 320px);
|
812 |
+
/*border: 1px solid #9986ee;*/
|
813 |
+
padding: 20px;
|
814 |
+
background-color: #FFF;
|
815 |
+
margin-top: 20px;
|
816 |
+
-webkit-box-sizing: border-box;
|
817 |
+
-moz-box-sizing: border-box;
|
818 |
+
box-sizing: border-box;
|
819 |
+
margin-right: 20px;
|
820 |
+
}
|
821 |
+
|
822 |
+
.apsc-add-set-wrapper .apsc-upgrade-wrapper {
|
823 |
+
width: 300px;
|
824 |
+
margin-top: 20px;
|
825 |
+
|
826 |
+
}
|
827 |
+
.apsc-upgrade-button-wrap-backend {
|
828 |
+
text-align: center;
|
829 |
+
}
|
830 |
+
.apsc-upgrade-button-wrap-backend a,
|
831 |
+
.apsc-button-wrap-backend a {
|
832 |
+
text-decoration: none;
|
833 |
+
background-color: #3d74f1;
|
834 |
+
color: #fff;
|
835 |
+
border: 1px solid #3d74f1;
|
836 |
+
height: 30px;
|
837 |
+
line-height: 30px;
|
838 |
+
padding: 0 10px;
|
839 |
+
margin: 10px 0px 10px 0;
|
840 |
+
display: inline-block;
|
841 |
+
-webkit-transition: .3s;
|
842 |
+
-moz-transition: .3s;
|
843 |
+
-ms-transition: .3s;
|
844 |
+
-o-transition: .3s;
|
845 |
+
transition: .3s;
|
846 |
+
}
|
847 |
+
|
848 |
+
.nav-tab {
|
849 |
+
margin-top: 0.5em;
|
850 |
+
}
|
851 |
+
|
852 |
+
@media screen and (max-width: 1076px) {
|
853 |
+
.nav-tab {
|
854 |
+
width: 40%;
|
855 |
+
}
|
856 |
+
.product {
|
857 |
+
width: 100%;
|
858 |
+
}
|
859 |
+
}
|
860 |
+
@media screen and (max-width: 992px) {
|
861 |
+
.apsc-option-field,
|
862 |
+
.apsc-fields-configurations {
|
863 |
+
width: 100%;
|
864 |
+
}
|
865 |
+
.nav-tab {
|
866 |
+
width: 100%;
|
867 |
+
max-width: 100%;
|
868 |
+
margin-left: 0;
|
869 |
+
-webkit-box-sizing: border-box;
|
870 |
+
-moz-box-sizing: border-box;
|
871 |
+
box-sizing: border-box;
|
872 |
+
}
|
873 |
}
|
images/upgrade-to-pro/upgrade-to-pro-feature.png
ADDED
Binary file
|
images/upgrade-to-pro/upgrade-to-pro.png
ADDED
Binary file
|
inc/backend/boards/about.php
CHANGED
@@ -5,61 +5,77 @@
|
|
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 |
-
|
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 |
-
<
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
63 |
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
<div class = "seperator"></div><div class = "dottedline"></div><div class = "seperator"></div>
|
|
|
61 |
|
62 |
+
<h3 class = "sub-title"><?php _e( 'Get in touch', 'accesspress-social-counter' ); ?></h3>
|
63 |
+
<p><?php _e( 'If you’ve any question/feedback, please get in touch:', 'accesspress-social-counter' ); ?> <br />
|
64 |
+
<strong><?php _e( 'General enquiries', 'accesspress-social-counter' ); ?>:</strong> <a href = "mailto:info@accesspressthemes.com">info@accesspressthemes.com</a><br />
|
65 |
+
<strong><?php _e( 'Support', 'accesspress-social-counter' ); ?>:</strong> <a href = "mailto:support@accesspressthemes.com">support@accesspressthemes.com</a><br />
|
66 |
+
<strong><?php _e( 'Sales', 'accesspress-social-counter' ); ?>:</strong> <a href = "mailto:sales@accesspressthemes.com">sales@accesspressthemes.com</a>
|
67 |
+
</p>
|
68 |
+
<div class = "seperator"></div><div class = "dottedline"></div><div class = "seperator"></div>
|
69 |
+
<h3 class = "sub-title"><?php _e( 'Get social', 'accesspress-social-counter' ); ?></h3>
|
70 |
+
<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>
|
71 |
|
72 |
+
<p><strong><?php _e( 'Like us on facebook', 'accesspress-social-counter' ); ?>:</strong><br />
|
73 |
+
<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>
|
74 |
+
|
75 |
+
<ul class = "social-icon">
|
76 |
+
<li><a href = "http://www.pinterest.com/accesspresswp/" target = "_blank"><img src = "<?php echo SC_IMAGE_DIR; ?>/pinterest.png" alt = "pinterest"></a></li>
|
77 |
+
<li><a href = "https://www.flickr.com/photos/accesspressthemes/" target = "_blank"><img src = "<?php echo SC_IMAGE_DIR; ?>/flicker.png" alt = "flicker"></a></li>
|
78 |
+
<li><a href = "https://twitter.com/apthemes" target = "_blank"><img src = "<?php echo SC_IMAGE_DIR; ?>/twitter.png" alt = "twitter"/></a></li>
|
79 |
+
</ul>
|
80 |
+
</div>
|
81 |
+
</div>
|
inc/backend/boards/cache-settings.php
CHANGED
@@ -1,11 +1,14 @@
|
|
1 |
<div class="apsc-boards-tabs" id="apsc-board-cache-settings" style="display:none">
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
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 |
+
<?php
|
12 |
+
include(SC_PATH . '/inc/backend/boards/save-button.php');
|
13 |
+
?>
|
14 |
</div>
|
inc/backend/boards/display-settings.php
CHANGED
@@ -17,12 +17,13 @@
|
|
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 |
?>
|
21 |
<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>
|
22 |
<input type="hidden" name="profile_order[]" value="<?php echo $social_profile; ?>"/>
|
23 |
</li>
|
24 |
<?php
|
25 |
-
}
|
26 |
?>
|
27 |
</ul>
|
28 |
</div>
|
@@ -101,4 +102,7 @@
|
|
101 |
</div>
|
102 |
</div>
|
103 |
</div>
|
104 |
-
|
|
|
|
|
|
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>
|
102 |
</div>
|
103 |
</div>
|
104 |
</div>
|
105 |
+
<?php
|
106 |
+
include(SC_PATH . '/inc/backend/boards/save-button.php');
|
107 |
+
?>
|
108 |
+
</div>
|
inc/backend/boards/how-to-use.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<div class="apsc-boards-tabs" id="apsc-board-how_to_use-settings" style="display:none">
|
2 |
<div class="apsc-tab-wrapper">
|
3 |
-
<p><?php _e( 'To display the social profiles with counter, you can either use', 'accesspress-social-counter' ); ?> [aps-counter] <strong><?php _e( 'Shortcode', 'accesspress-social-counter' ); ?></strong><?php _e( 'or you can use', 'accesspress-social-counter' ); ?> <strong><?php _e( 'AccessPress Social Counter Widget', 'accesspress-social-counter' ); ?></strong><?php _e( "from Appearance's widget section.", '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
|
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 |
|
1 |
<div class="apsc-boards-tabs" id="apsc-board-how_to_use-settings" style="display:none">
|
2 |
<div class="apsc-tab-wrapper">
|
3 |
+
<p><?php _e( 'To display the social profiles with counter, you can either use', 'accesspress-social-counter' ); ?> [aps-counter] <strong><?php _e( 'Shortcode ', 'accesspress-social-counter' ); ?></strong><?php _e( 'or you can use ', 'accesspress-social-counter' ); ?> <strong><?php _e( 'AccessPress Social Counter Widget ', 'accesspress-social-counter' ); ?></strong><?php _e( "from Appearance's widget section. ", '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 />
|
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 |
|
inc/backend/boards/save-button.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
wp_nonce_field('apsc_settings_action', 'apsc_settings_nonce');
|
4 |
+
?>
|
5 |
+
<div id="optionsframework-submit" class="ap-settings-submit">
|
6 |
+
<input type="submit" class="button button-primary" value="Save all changes" name="ap_settings_submit"/>
|
7 |
+
<?php
|
8 |
+
$nonce = wp_create_nonce('apsc-restore-default-nonce');
|
9 |
+
$cache_nonce = wp_create_nonce('apsc-cache-nonce');
|
10 |
+
?>
|
11 |
+
<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>
|
12 |
+
<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>
|
13 |
+
</div>
|
inc/backend/boards/social-profiles.php
CHANGED
@@ -399,5 +399,7 @@
|
|
399 |
<!--Comments-->
|
400 |
|
401 |
</div>
|
402 |
-
|
|
|
|
|
403 |
</div>
|
399 |
<!--Comments-->
|
400 |
|
401 |
</div>
|
402 |
+
<?php
|
403 |
+
include(SC_PATH . '/inc/backend/boards/save-button.php');
|
404 |
+
?>
|
405 |
</div>
|
inc/backend/settings.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
defined('ABSPATH') or die("No script kiddies please!");
|
3 |
|
4 |
$apsc_settings = $this->apsc_settings;
|
5 |
-
|
6 |
?>
|
7 |
<div class="wrap">
|
8 |
<div class="apsc-add-set-wrapper clearfix">
|
@@ -15,7 +15,6 @@ $apsc_settings = $this->apsc_settings;
|
|
15 |
<div class="apsc-socials">
|
16 |
<p><?php _e('Follow us for new updates', 'accesspress-social-counter') ?></p>
|
17 |
<div class="ap-social-bttns">
|
18 |
-
|
19 |
<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FAccessPress-Themes%2F1396595907277967&width&layout=button&action=like&show_faces=false&share=false&height=35&appId=1411139805828592" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:20px; width:50px " allowTransparency="true"></iframe>
|
20 |
|
21 |
<a href="https://twitter.com/apthemes" class="twitter-follow-button" data-show-count="false" data-lang="en">Follow @apthemes</a>
|
@@ -28,19 +27,20 @@ $apsc_settings = $this->apsc_settings;
|
|
28 |
fjs.parentNode.insertBefore(js, fjs);
|
29 |
}
|
30 |
}(document, "script", "twitter-wjs");</script>
|
31 |
-
|
32 |
</div>
|
33 |
</div>
|
34 |
|
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">
|
@@ -50,84 +50,97 @@ $apsc_settings = $this->apsc_settings;
|
|
50 |
<a href="javascript:void(0)" id="cache-settings" class="nav-tab apsc-tabs-trigger"><?php _e('Cache Settings', 'accesspress-social-counter'); ?></a>
|
51 |
<a href="javascript:void(0)" id="system-status" class="nav-tab apsc-tabs-trigger"><?php _e('System Status', 'accesspress-social-counter'); ?></a>
|
52 |
<a href="javascript:void(0)" id="how_to_use-settings" class="nav-tab apsc-tabs-trigger"><?php _e('How to use', 'accesspress-social-counter'); ?></a>
|
53 |
-
<a href="javascript:void(0)" id="about-settings" class="nav-tab apsc-tabs-trigger"><?php _e('About', '
|
54 |
-
<a href="http://wpall.club" target="_blank" id="about-settings" class="nav-tab apsc-tabs-trigger"><?php _e('More WP Resources', '
|
55 |
</h2>
|
56 |
|
57 |
-
|
58 |
<div class="metabox-holder">
|
59 |
<div id="optionsframework" class="postbox" style="float: left;">
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
</div>
|
123 |
-
|
124 |
-
</div>
|
125 |
-
<div class="apsc-promoFloat">
|
126 |
-
<img src="<?php echo SC_IMAGE_DIR . '/promo-top.png' ?>" alt="promo-top" />
|
127 |
-
<div class="apsc-promo-buttons"><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><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></div>
|
128 |
-
<img src="<?php echo SC_IMAGE_DIR . '/promo-bottom.png' ?>" alt="promo-bottom" />
|
129 |
-
<div class="apsc-promo-buttons"><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><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></div>
|
130 |
</div>
|
131 |
-
|
132 |
-
</div>
|
133 |
-
</div><!--div class wrap-->
|
2 |
defined('ABSPATH') or die("No script kiddies please!");
|
3 |
|
4 |
$apsc_settings = $this->apsc_settings;
|
5 |
+
//$this->print_array($apsc_settings);
|
6 |
?>
|
7 |
<div class="wrap">
|
8 |
<div class="apsc-add-set-wrapper clearfix">
|
15 |
<div class="apsc-socials">
|
16 |
<p><?php _e('Follow us for new updates', 'accesspress-social-counter') ?></p>
|
17 |
<div class="ap-social-bttns">
|
|
|
18 |
<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FAccessPress-Themes%2F1396595907277967&width&layout=button&action=like&show_faces=false&share=false&height=35&appId=1411139805828592" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:20px; width:50px " allowTransparency="true"></iframe>
|
19 |
|
20 |
<a href="https://twitter.com/apthemes" class="twitter-follow-button" data-show-count="false" data-lang="en">Follow @apthemes</a>
|
27 |
fjs.parentNode.insertBefore(js, fjs);
|
28 |
}
|
29 |
}(document, "script", "twitter-wjs");</script>
|
|
|
30 |
</div>
|
31 |
</div>
|
32 |
|
33 |
<div class="apsc-title"><?php _e('AccessPress Social Counter', 'accesspress-social-counter'); ?></div>
|
34 |
</div>
|
35 |
<?php if(isset($_GET['message'])){?><div class="notice notice-success is-dismissible"><p><?php echo __('Settings Saved Successfully','accesspress-social-counter');?></p></div><?php }?>
|
36 |
+
<div class="notice notice-info is-dismissible">
|
37 |
+
<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>
|
38 |
+
</div>
|
39 |
+
|
40 |
+
<div class="notice notice-info is-dismissible">
|
41 |
+
<p>
|
42 |
+
<?php _e('If you find any unusual 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');?>
|
43 |
+
</p>
|
44 |
</div>
|
45 |
|
46 |
<div class="apsc-boards-wrapper">
|
50 |
<a href="javascript:void(0)" id="cache-settings" class="nav-tab apsc-tabs-trigger"><?php _e('Cache Settings', 'accesspress-social-counter'); ?></a>
|
51 |
<a href="javascript:void(0)" id="system-status" class="nav-tab apsc-tabs-trigger"><?php _e('System Status', 'accesspress-social-counter'); ?></a>
|
52 |
<a href="javascript:void(0)" id="how_to_use-settings" class="nav-tab apsc-tabs-trigger"><?php _e('How to use', 'accesspress-social-counter'); ?></a>
|
53 |
+
<a href="javascript:void(0)" id="about-settings" class="nav-tab apsc-tabs-trigger"><?php _e('About', 'accesspress-social-counter'); ?></a>
|
54 |
+
<a href="http://wpall.club" target="_blank" id="about-settings" class="nav-tab apsc-tabs-trigger"><?php _e('More WP Resources', 'accesspress-social-counter'); ?></a>
|
55 |
</h2>
|
56 |
|
|
|
57 |
<div class="metabox-holder">
|
58 |
<div id="optionsframework" class="postbox" style="float: left;">
|
59 |
<form class="apsc-settings-form" method="post" action="<?php echo admin_url() . 'admin-post.php' ?>">
|
60 |
<input type="hidden" name="action" value="apsc_settings_action"/>
|
61 |
<?php
|
62 |
+
/**
|
63 |
+
* Social Profiles
|
64 |
+
* */
|
65 |
+
include_once('boards/social-profiles.php');
|
66 |
+
?>
|
67 |
+
|
68 |
+
<?php
|
69 |
+
/**
|
70 |
+
* Display Settings
|
71 |
+
* */
|
72 |
+
include_once('boards/display-settings.php');
|
73 |
+
?>
|
74 |
+
|
75 |
+
<?php
|
76 |
+
/**
|
77 |
+
* Captcha Settings
|
78 |
+
* */
|
79 |
+
include_once('boards/cache-settings.php');
|
80 |
+
?>
|
81 |
+
|
82 |
+
<?php
|
83 |
+
/**
|
84 |
+
* System Status
|
85 |
+
* */
|
86 |
+
include_once('boards/system-status.php');
|
87 |
+
?>
|
88 |
+
|
89 |
+
<?php
|
90 |
+
/**
|
91 |
+
* Captcha Settings
|
92 |
+
* */
|
93 |
+
include_once('boards/how-to-use.php');
|
94 |
+
?>
|
95 |
+
|
96 |
+
|
97 |
+
<?php
|
98 |
+
/**
|
99 |
+
* About Tab
|
100 |
+
* */
|
101 |
+
include_once('boards/about.php');
|
102 |
+
?>
|
103 |
+
<?php
|
104 |
+
/**
|
105 |
+
* Nonce field
|
106 |
+
* */
|
107 |
+
?>
|
108 |
+
</form>
|
109 |
+
</div><!--optionsframework-->
|
110 |
+
</div>
|
111 |
+
</div>
|
112 |
+
</div>
|
113 |
+
<!-- <div class="apsc-promoFloat">
|
114 |
+
<img src="<?php //echo SC_IMAGE_DIR . '/promo-top.png' ?>" alt="promo-top" />
|
115 |
+
<div class="apsc-promo-buttons">
|
116 |
+
<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>
|
117 |
+
<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>
|
118 |
+
</div>
|
119 |
+
<img src="<?php //echo SC_IMAGE_DIR . '/promo-bottom.png' ?>" alt="promo-bottom" />
|
120 |
+
<div class="apsc-promo-buttons">
|
121 |
+
<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>
|
122 |
+
<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>
|
123 |
+
</div>
|
124 |
+
</div> -->
|
125 |
+
|
126 |
+
<div class="apsc-upgrade-wrapper">
|
127 |
+
<a href="<?php echo APSC_PRO_LINK ?>" target="_blank">
|
128 |
+
<img src="<?php echo SC_IMAGE_DIR . '/upgrade-to-pro/upgrade-to-pro.png' ?>" style="width:100%;">
|
129 |
+
</a>
|
130 |
+
|
131 |
+
<div class="apsc-upgrade-button-wrap-backend">
|
132 |
+
|
133 |
+
<a href="<?php echo APSC_PRO_DEMO; ?>" class="smls-demo-btn" target="_blank">Demo</a>
|
134 |
+
|
135 |
+
<a href="<?php echo APSC_PRO_LINK; ?>" target="_blank" class="smls-upgrade-btn">Upgrade</a>
|
136 |
+
|
137 |
+
<a href="<?php echo APSC_PRO_DETAIL; ?>" target="_blank" class="smls-upgrade-btn">Plugin Information</a>
|
138 |
+
|
139 |
+
</div>
|
140 |
+
|
141 |
+
<a href="<?php echo APSC_PRO_LINK ?>" target="_blank">
|
142 |
+
<img src="<?php echo SC_IMAGE_DIR; ?>/upgrade-to-pro/upgrade-to-pro-feature.png" alt="<?php _e( 'AccessPress Social Pro', 'accesspress-social-counter' ); ?>" style="width:100%;">
|
143 |
+
</a>
|
144 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
</div>
|
146 |
+
</div>
|
|
|
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
===
|
2 |
Contributors: Access Keys
|
3 |
Tags: social count, social counter, social counters, social media counters, social media, social network, social profiles counter, social profile count, social profile, social icons, social icon counter
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 4.5
|
6 |
-
Tested up to: 5.2.
|
7 |
-
Stable tag: 1.8.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -135,7 +135,6 @@ No , because we have provided the caching option to store the count in the datab
|
|
135 |
No , you won't need to get any trouble regarding design and layout of the icons since we have provided inbuilt 5 beautiful icon themes.You can choose any as per your requirement.
|
136 |
|
137 |
|
138 |
-
|
139 |
= Where can I find the documentation for the plugin? =
|
140 |
Once you install the plugin , you can check some general documentation about how to use the plugin in the "How to use" panel of the plugin's settings page.Complete documentation can be found [here](https://accesspressthemes.com/documentation/documentation-plugin-instruction-accesspress-social-counter/).
|
141 |
|
@@ -148,6 +147,12 @@ Once you install the plugin , you can check some general documentation about how
|
|
148 |
|
149 |
== Changelog ==
|
150 |
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
= 1.8.2 =
|
152 |
* Removed Google+ from the plugin
|
153 |
|
1 |
+
=== AccessPress Social Counter ===
|
2 |
Contributors: Access Keys
|
3 |
Tags: social count, social counter, social counters, social media counters, social media, social network, social profiles counter, social profile count, social profile, social icons, social icon counter
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 4.5
|
6 |
+
Tested up to: 5.2.2
|
7 |
+
Stable tag: 1.8.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
135 |
No , you won't need to get any trouble regarding design and layout of the icons since we have provided inbuilt 5 beautiful icon themes.You can choose any as per your requirement.
|
136 |
|
137 |
|
|
|
138 |
= Where can I find the documentation for the plugin? =
|
139 |
Once you install the plugin , you can check some general documentation about how to use the plugin in the "How to use" panel of the plugin's settings page.Complete documentation can be found [here](https://accesspressthemes.com/documentation/documentation-plugin-instruction-accesspress-social-counter/).
|
140 |
|
147 |
|
148 |
== Changelog ==
|
149 |
|
150 |
+
= 1.8.4 =
|
151 |
+
* Refinements in the plugin to avoid trademark infringement
|
152 |
+
|
153 |
+
= 1.8.3 =
|
154 |
+
* Bug fix related to Google+
|
155 |
+
|
156 |
= 1.8.2 =
|
157 |
* Removed Google+ from the plugin
|
158 |
|