PluginProbe ʕ •ᴥ•ʔ
Wp Social Login and Register Social Counter / trunk
Wp Social Login and Register Social Counter vtrunk
trunk 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.10 1.3.11 1.3.2 1.3.3 1.3.4 1.3.6 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.4 1.4.5 1.4.6 1.4.8 1.4.9 1.5.0 1.6.0 1.6.1 1.7.0 1.7.1 1.7.2 1.7.3 1.7.4 1.8.0 1.8.1 1.8.2 1.8.3 1.8.5 1.8.6 1.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.8 2.2.9 3.0.0 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0
wp-social / inc / custom-function.php
wp-social / inc Last commit date
elementor 3 years ago admin-create-shortcode.php 7 years ago admin-create-user.php 5 months ago admin-custom-function.php 1 year ago admin-rest-api.php 7 months ago admin-settings.php 2 years ago admin-social-button.php 4 months ago admin-social-enque-script.php 5 years ago counter-widget.php 3 years ago counter.php 7 months ago custom-function.php 4 years ago login-widget.php 3 years ago login.php 5 years ago share-widget.php 3 years ago share.php 3 months ago
custom-function.php
75 lines
1 <?php
2
3 if (!defined('ABSPATH')) die('Forbidden');
4
5 /**
6 * These are mostly for other plugin, like woocommerce share product widget
7 *
8 */
9
10
11 if(!function_exists('__wp_social_api_share')) {
12
13 function __wp_social_api_share($providers, $attributes = []) {
14
15 if(empty($providers)) {
16
17 return '';
18 }
19
20 if($providers === 'all') {
21
22 $out_provider = \WP_Social\App\Share_Settings::instance()->get_enabled_providers();
23
24 } else {
25
26 $providers = explode(',', $providers);
27 $p_conf = \WP_Social\App\Share_Settings::instance()->get_enabled_providers();
28 $out_provider = [];
29
30 foreach($providers as $provider) {
31
32 $provider = trim($provider);
33
34 if(isset($p_conf[$provider]) && !empty($p_conf[$provider]['enable'])) {
35
36 $out_provider[$provider] = $p_conf[$provider];
37 }
38 }
39 }
40
41 $share = new \WP_Social\App\Share();
42
43 return $share->get_share_primary_content($out_provider, $attributes);
44 }
45 }
46
47
48 if(!function_exists('__wp_social_share')) {
49
50 function __wp_social_share($provider = 'all', $atts = []) {
51 if(class_exists('\WP_Social\Inc\Share')) {
52 $return = new \WP_Social\Inc\Share(false);
53
54 return $return->get_share_data($provider, $atts);
55 }
56 }
57 }
58
59 if(!function_exists('__wp_social_share_pro_check')) {
60 function __wp_social_share_pro_check() {
61 $option_key = 'xs_share_providers_data';
62 $xsc_options = get_option($option_key) ? get_option($option_key) : [];
63 $share_provider = isset($xsc_options['social']) ? $xsc_options['social'] : [];
64
65 foreach($share_provider AS $kk => $vv):
66 if(isset($share_provider[$kk]['enable'])) {
67 return true;
68 }
69 endforeach;
70
71 return false;
72 }
73 }
74
75