PluginProbe ʕ •ᴥ•ʔ
Wp Social Login and Register Social Counter / 3.0.8
Wp Social Login and Register Social Counter v3.0.8
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 / autoload.php
wp-social Last commit date
app 2 years ago assets 1 year ago base 5 years ago helper 3 years ago inc 1 year ago languages 1 year ago lib 1 year ago template 1 year ago traits 5 years ago xs_migration 3 years ago autoload.php 5 years ago instruction.txt 5 years ago keys.php 5 years ago phpcs.xml 3 years ago plugin.php 4 years ago readme.txt 1 year ago wp-social.php 1 year ago
autoload.php
85 lines
1 <?php
2
3 namespace WP_Social;
4
5 defined('ABSPATH') || exit;
6
7 /**
8 * autoloader.
9 * Handles dynamically loading classes only when needed.
10 *
11 * @since 1.0.0
12 */
13 class Autoloader {
14
15 /**
16 * Run autoloader.
17 * Register a function as `__autoload()` implementation.
18 *
19 * @since 1.0.0
20 * @access public
21 */
22 public static function run() {
23 spl_autoload_register([__CLASS__, 'autoload']);
24 }
25
26
27 /**
28 * Autoload.
29 * For a given class, check if it exist and load it.
30 *
31 * @since 1.0.0
32 * @access private
33 *
34 * @param string $class Class name.
35 */
36 private static function autoload($class_name) {
37
38 // If the class being requested does not start with our prefix
39 // we know it's not one in our project.
40 if(0 !== strpos($class_name, __NAMESPACE__)) {
41 return;
42 }
43
44
45 $file_name = strtolower(
46 preg_replace(
47 ['/\b' . __NAMESPACE__ . '\\\/', '/([a-z])([A-Z])/', '/_/', '/\\\/'],
48 ['', '$1-$2', '-', DIRECTORY_SEPARATOR],
49 $class_name
50 )
51 );
52
53 // Compile our path from the corosponding location.
54 $file = plugin_dir_path(__FILE__) . $file_name . '.php';
55
56 // If a file is found.
57 if(file_exists($file)) {
58 // Then load it up!
59 require_once($file);
60 }
61 }
62 }
63
64
65
66 require(WSLU_LOGIN_PLUGIN.'/lib/composer/vendor/autoload.php');
67
68 Autoloader::run();
69
70 // Include user custom function
71 require_once(WSLU_LOGIN_PLUGIN.'/inc/admin-custom-function.php');
72
73 require_once(WSLU_LOGIN_PLUGIN.'/inc/admin-social-button.php');
74
75 require_once(WSLU_LOGIN_PLUGIN.'/inc/admin-create-shortcode.php');
76
77 require_once(WSLU_LOGIN_PLUGIN.'/inc/admin-rest-api.php');
78
79 require_once(WSLU_LOGIN_PLUGIN.'lib/counter/counters-api.php');
80
81
82 // elementor plugin
83 require_once(WSLU_LOGIN_PLUGIN.'/inc/elementor/elements.php'); // namespace different but easy to change - just need to find the references
84
85