forked from magic-fields-team/Magic-Fields-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmf_extra.php
56 lines (44 loc) · 939 Bytes
/
mf_extra.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
//funciones de uso general admin o fron-end
/**
* aux function
**/
if (!function_exists('pr')) {
function pr($data){
echo "<pre>";
print_r($data);
echo "</pre>";
}
}
/* return true is MF ins plugin multinetwork */
if( !function_exists('mf_mu') ){
function mf_mu(){
if ( function_exists( 'is_multisite' ) )
return is_multisite();
return false;
}
}
if( !function_exists('mf_mu2') ){
function mf_mu2(){
global $current_blog;
if(isset($current_blog)){
return true;
}else{
return false;
}
}
}
if ( !defined('DS') ){
if (strpos(php_uname('s'), 'Win') !== false )
define('DS', '\\');
else
define('DS', '/');
}
if( !function_exists('mf_mu_alone') ){
function mf_mu_alone(){
$current = get_option('active_plugins');
$plugin = plugin_basename(MF_PATH.'/main.php');
if( in_array($plugin,$current) ) return true;
return false;
}
}