PluginProbe ʕ •ᴥ•ʔ
Wp Social Login and Register Social Counter / 2.2.9
Wp Social Login and Register Social Counter v2.2.9
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 / plugin.php
wp-social Last commit date
app 7 months ago assets 7 months ago base 7 months ago helper 7 months ago inc 7 months ago languages 7 months ago lib 7 months ago template 7 months ago traits 7 months ago xs_migration 7 months ago autoload.php 7 months ago instruction.txt 7 months ago keys.php 7 months ago phpcs.xml 7 months ago plugin.php 7 months ago readme.txt 7 months ago wp-social.php 7 months ago
plugin.php
113 lines
1 <?php
2
3 namespace WP_Social;
4
5 defined('ABSPATH') || exit;
6
7 class Plugin {
8
9 private static $instance;
10
11 public static function instance() {
12 if(!self::$instance) {
13 self::$instance = new static();
14 }
15
16 return self::$instance;
17 }
18
19 public function plugin_url() {
20
21 return trailingslashit(plugin_dir_url(__FILE__));
22 }
23
24 public function plugin_dir() {
25
26 return trailingslashit(plugin_dir_path(__FILE__));
27 }
28
29 public function lib_url() {
30
31 return $this->plugin_url() . 'lib/';
32 }
33
34 public function lib_dir() {
35
36 return $this->plugin_dir() . 'lib/';
37 }
38
39 public function account_url(){
40 return 'https://account.wpmet.com';
41 }
42
43 public function package_type() {
44 return apply_filters( 'wp-social/core/package_type', 'free');
45 }
46
47 public function enqueue() {
48
49 add_action( 'admin_enqueue_scripts', [$this, 'load_admin_scripts'] );
50
51 add_action( 'wp_enqueue_scripts', [$this, 'load_public_scripts'] );
52 }
53
54
55 public function load_admin_scripts() {
56 wp_enqueue_style( 'wps-wp-dashboard', WSLU_LOGIN_PLUGIN_URL . 'assets/css/wps-wp-dashboard.css', [], WSLU_VERSION );
57
58 wp_register_script( 'wslu_admin', WSLU_LOGIN_PLUGIN_URL. 'assets/js/admin-main.js', array('jquery', 'jquery-ui-sortable'));
59 wp_register_script( 'xs_login_custom_js1', WSLU_LOGIN_PLUGIN_URL. 'assets/js/admin-login-custom.js', array('jquery'));
60 wp_register_script( 'wp_social_select2_js', WSLU_LOGIN_PLUGIN_URL. 'assets/select2/script/select2-min.js', array('jquery'));
61 wp_register_script( 'wp_social_sortable_js', WSLU_LOGIN_PLUGIN_URL. 'assets/js/sortable.min.js', array('jquery'));
62
63
64 wp_localize_script('xs_login_custom_js1', 'rest_api_conf', array(
65 'siteurl' => get_option('siteurl'),
66 'nonce' => wp_create_nonce('wp_rest'),
67 'root' => get_rest_url(),
68 ));
69
70 wp_localize_script('wslu_admin', 'wsluAdminObj', [
71 'resturl' => get_rest_url(),
72 'rest_nonce' => wp_create_nonce('wp_rest'),
73 ]);
74
75 wp_enqueue_script( 'xs_login_custom_js1' );
76 wp_enqueue_script( 'wp_social_select2_js' );
77 wp_enqueue_script( 'wp_social_sortable_js' );
78 wp_enqueue_script( 'wslu_admin' );
79
80
81 wp_register_style( 'xs_login_custom_css1', WSLU_LOGIN_PLUGIN_URL. 'assets/css/admin-login-custom.css');
82 wp_register_style( 'wp_social_select2_css', WSLU_LOGIN_PLUGIN_URL. 'assets/select2/css/select2-min.css');
83 wp_register_style( 'xs_login_custom_css_icon', WSLU_LOGIN_PLUGIN_URL. 'assets/css/font-icon.css');
84 wp_register_style( 'xs_login_custom_css2', WSLU_LOGIN_PLUGIN_URL. 'assets/css/admin.css');
85 wp_register_style( 'xs_login_custom_css3', WSLU_LOGIN_PLUGIN_URL. 'assets/css/admin-responsive.css');
86
87 wp_enqueue_style( 'xs_login_custom_css1' );
88 wp_enqueue_style( 'wp_social_select2_css' );
89 wp_enqueue_style( 'xs_login_custom_css2' );
90 wp_enqueue_style( 'xs_login_custom_css3' );
91 wp_enqueue_style( 'xs_login_custom_css_icon' );
92 }
93
94
95 public function load_public_scripts() {
96
97 wp_register_script( 'xs_social_custom', WSLU_LOGIN_PLUGIN_URL. 'assets/js/social-front.js', array('jquery'));
98
99 wp_localize_script('xs_social_custom', 'rest_api_conf', array(
100 'siteurl' => get_option('siteurl'),
101 'nonce' => wp_create_nonce('wp_rest'),
102 'root' => get_rest_url(),
103 ));
104
105 wp_localize_script('xs_social_custom', 'wsluFrontObj', [
106 'resturl' => get_rest_url(),
107 'rest_nonce' => wp_create_nonce('wp_rest'),
108 ]);
109
110 wp_enqueue_script( 'xs_social_custom' );
111 }
112 }
113