PluginProbe
Extendify / 1.0.1
Extendify v1.0.1
3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 0.7.0 0.8.0 All 125 releases
extendify / loader.php

loader.php in Extendify 1.0.1, at loader.php

54 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * This file is used to help side load the library.
4 * Be sure to remove the front matter from extendify.php
5 */
6
7 if (!defined('ABSPATH')) {
8 exit;
9 }
10
11 if (!function_exists('extendifyCheckPluginInstalled')) {
12 /**
13 * Will be truthy if the plugin is installed.
14 *
15 * @param string $name name of the plugin 'extendify'.
16 * @return bool|string - will return path, ex. 'extendify/extendify.php'.
17 */
18 function extendifyCheckPluginInstalled($name)
19 {
20 if (!function_exists('get_plugins')) {
21 include_once ABSPATH . 'wp-admin/includes/plugin.php';
22 }
23
24 $plugins = get_plugins();
25 // Don't cache plugins this early.
26 wp_cache_delete('plugins', 'plugins');
27 foreach ($plugins as $plugin => $data) {
28 if ($data['TextDomain'] === $name) {
29 return $plugin;
30 }
31 }
32
33 return false;
34 }
35 }//end if
36
37 $extendifyPluginName = extendifyCheckPluginInstalled('extendify');
38 if ($extendifyPluginName) {
39 // Exit if the library is installed and active.
40 // Remember, this file is only loaded by partner plugins.
41 if (is_plugin_active($extendifyPluginName)) {
42 // If the SDK is active then ignore the partner plugins.
43 $GLOBALS['extendify_sdk_partner'] = 'standalone';
44 return false;
45 }
46 }
47
48 // Next is first come, first serve. The later class is left in for historical reasons.
49 if (class_exists('Extendify') || class_exists('ExtendifySdk')) {
50 return false;
51 }
52
53 require_once plugin_dir_path(__FILE__) . 'extendify.php';
54