PluginProbe ʕ •ᴥ•ʔ
Wp Social Login and Register Social Counter / 3.2.1
Wp Social Login and Register Social Counter v3.2.1
3.2.1 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 / admin-custom-function.php
wp-social / inc Last commit date
elementor 3 years ago admin-create-shortcode.php 7 years ago admin-create-user.php 1 week ago admin-custom-function.php 1 week ago admin-rest-api.php 1 week ago admin-settings.php 2 years ago admin-social-button.php 1 week ago admin-social-enque-script.php 5 years ago counter-widget.php 1 week ago counter.php 1 week ago custom-function.php 5 years ago login-widget.php 3 years ago login.php 5 years ago share-widget.php 1 week ago share.php 1 week ago
admin-custom-function.php
142 lines
1 <?php
2
3 use WP_Social\App\Settings;
4
5 defined('ABSPATH') || exit;
6
7 /**
8 * Variable Name : $getLogoutUrl;
9 * Variable Details : User logout and redirect current url
10 *
11 * @params : String() $_GET['XScurrentPageLog']. Get data from URL
12 *
13 * @since : 1.0
14 */
15 if(isset($_GET['loggedout']) && isset($_GET['XScurrentPageLog'])) {
16 $getLogoutUrl = sanitize_url($_GET['XScurrentPageLog']);
17
18 if(wp_redirect($getLogoutUrl)) {
19 exit;
20 }
21 }
22
23 /**
24 * Function Name : xs_current_url_custom();
25 * Function Details : Set current url with HTTPS | HTTP.
26 *
27 * @params : void
28 *
29 * @return : String() Current URL when Current URL != base URL
30 *
31 * @since : 1.0
32 */
33 if(!function_exists('xs_current_url_custom')) {
34 function xs_current_url_custom() {
35 $current_url = (isset($_SERVER['HTTPS']) && sanitize_text_field($_SERVER['HTTPS']) === 'on' ? 'https' : 'http') . '://' . sanitize_text_field($_SERVER['HTTP_HOST']) . sanitize_url($_SERVER['REQUEST_URI']);
36 if(get_home_url() . '/' === $current_url) {
37 $current_url = '';
38 }
39
40 return trim($current_url);
41 }
42 }
43
44 /**
45 * Function Name : xs_create_dynamic_shortcode();
46 * Function Details : Create shortcode dynamic . if you provide or not
47 *
48 * @params : String $atts. if you provide Exam: provider="facebook,twitter,github"
49 * @params : String $btn-text. if you provide Exam: btn-text="Login with Facebook"
50 * @params : String $class Set Class. class="test-class"
51 *
52 * @return : String Output
53 *
54 * @since : 1.0
55 */
56 if(!function_exists('xs_create_dynamic_shortcode')) {
57
58 function xs_create_dynamic_shortcode($atts, $content = null) {
59 $atts = shortcode_atts(
60 array(
61 'provider' => 'all',
62 'btn-text' => $content,
63 'class' => '',
64 'style' => '',
65 ), $atts, 'xs_social_login'
66 );
67
68 $str = empty($atts['provider']) ? 'all' : str_replace(' ', '', $atts['provider']);
69
70 $providers = explode(',', $str);
71
72 return xs_social_login_shortcode_widget($providers, $atts['btn-text'], 'show', $atts['class'], $atts['style']);
73 }
74 }
75
76 /**
77 * Function Name : xs_social_login_shortcode_widget();
78 * Function Details : Create shortcode button from template page .
79 *
80 * @params : String $atts. if you provide Exam: provider="facebook,twitter,github"
81 * @params : String $btn_content. if you provide Exam: btn-text="Login with Facebook"
82 * @params : String $typeCurrent. Current URL add or remove from redirect URL
83 * @params : String $className Set Class. class="test-class"
84 *
85 * @return : String Output of button
86 *
87 * @since : 1.0
88 */
89 if(!function_exists('xs_social_login_shortcode_widget')) {
90
91 function xs_social_login_shortcode_widget($attr_provider, $btn_content = null, $typeCurrent = 'show', $className = '', $force_style = '') {
92
93 $provider_data = \WP_Social\App\Settings::get_login_settings_data();
94 $style_data = get_option('xs_style_setting_data', []);
95
96 ob_start();
97 require(WSLU_LOGIN_PLUGIN . '/template/login/login-btn-html.php');
98 $buttonData = ob_get_contents();
99 ob_end_clean();
100
101 return $buttonData;
102 }
103 }
104
105 /**
106 * Function Name : xs_my_login_stylesheet();
107 * Function Details : Added style and script page in wp-login.php page
108 *
109 * @params : void
110 *
111 * @return : link page
112 *
113 * @since : 1.0
114 */
115 if(!function_exists('xs_my_login_stylesheet')) {
116 function xs_my_login_stylesheet() {
117 wp_enqueue_script('xs_login_custom_login_js', WSLU_LOGIN_PLUGIN_URL . 'assets/js/login-page/font-login-page.js', ['jquery']);
118 }
119 }
120
121
122 if(!function_exists('xs_my_global_stylesheet')) {
123
124 function xs_my_global_stylesheet() {
125 wp_enqueue_style('xs-front-style', WSLU_LOGIN_PLUGIN_URL . 'assets/css/frontend.css', [], WSLU_VERSION);
126
127 wp_enqueue_style('xs_login_font_login_css', WSLU_LOGIN_PLUGIN_URL . 'assets/css/font-icon.css', [], WSLU_VERSION);
128 wp_enqueue_script('xs_front_main_js', WSLU_LOGIN_PLUGIN_URL . 'assets/js/front-main.js', ['jquery'], WSLU_VERSION);
129
130 $data['rest_url'] = get_rest_url();
131 $data['nonce'] = wp_create_nonce('wp_rest');
132 $data['insta_enabled'] = Settings::instance()->load()->is_instagram_counter_enabled();
133 $data['i18n'] = [
134 'shareThisWith' => __('Share this with:', 'wp-social'),
135 'share' => __('Share', 'wp-social'),
136 ];
137
138 wp_localize_script('xs_front_main_js', 'rest_config', $data);
139 }
140 }
141
142