/var/www/(Del)hsihk.com/wp-content/plugins/backupbuddy/pluginbuddy/standalone_preloader.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
<?php
$pb_styles 
= array();
$pb_scripts = array();
$pb_actions = array();
$wp_scripts = array();

// NOTE: Modified from WP to rtrim on dirname() due to Windows issues.
function site_url() {
    
$pageURL 'http';
    if ( isset( 
$_SERVER["HTTPS"] ) && ( $_SERVER["HTTPS"] == "on" ) ) {$pageURL .= "s";}
    
$pageURL .= "://";
    if (
$_SERVER["SERVER_PORT"] != "80") {
        
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"] . rtrimdirname($_SERVER['PHP_SELF']), '/\\' );
    } else {
        
$pageURL .= $_SERVER["SERVER_NAME"] . rtrimdirname($_SERVER['PHP_SELF']), '/\\' );
    }
    
    return 
$pageURL;
}

/**
 * Navigates through an array and removes slashes from the values.
 *
 * If an array is passed, the array_map() function causes a callback to pass the
 * value back to the function. The slashes from this value will removed.
 *
 * @since 2.0.0
 *
 * @param array|string $value The array or string to be stripped.
 * @return array|string Stripped array (or string in the callback).
 */
function stripslashes_deep($value) {
    if ( 
is_array($value) ) {
        
$value array_map('stripslashes_deep'$value);
    } elseif ( 
is_object($value) ) {
        
$vars get_object_vars$value );
        foreach (
$vars as $key=>$data) {
            
$value->{$key} = stripslashes_deep$data );
        }
    } else {
        
$value stripslashes($value);
    }

    return 
$value;
}


/**
 * Check value to find if it was serialized.
 *
 * If $data is not an string, then returned value will always be false.
 * Serialized data is always a string.
 * Courtesy WordPress; since WordPress 2.0.5.
 *
 * @param mixed $data Value to check to see if was serialized.
 * @return bool False if not serialized and true if it was.
 */
function is_serialized$data ) {
    
// if it isn't a string, it isn't serialized
    
if ( ! is_string$data ) )
        return 
false;
    
$data trim$data );
     if ( 
'N;' == $data )
        return 
true;
    
$length strlen$data );
    if ( 
$length )
        return 
false;
    if ( 
':' !== $data[1] )
        return 
false;
    
$lastc $data[$length-1];
    if ( 
';' !== $lastc && '}' !== $lastc )
        return 
false;
    
$token $data[0];
    switch ( 
$token ) {
        case 
's' :
            if ( 
'"' !== $data[$length-2] )
                return 
false;
        case 
'a' :
        case 
'O' :
            return (bool) 
preg_match"/^{$token}:[0-9]+:/s"$data );
        case 
'b' :
        case 
'i' :
        case 
'd' :
            return (bool) 
preg_match"/^{$token}:[0-9.E-]+;\$/"$data );
    }
    return 
false;
// End is_serialized().

function __$text$domain '' ) {
    return 
$text;
}
function 
_e$text$domain '' ) {
    echo 
$text;
}

function 
wp_style_is$name ) {
    global 
$pb_styles;
    return 
array_key_exists$name$pb_styles );
}
function 
wp_enqueue_style$name$file$deps = array(), $ver '' ) {
    global 
$pb_styles;
    
$pb_styles[$name]['file'] = $file;
    
$pb_styles[$name]['version'] = $ver;
    
$pb_styles[$name]['printed'] = false;
}
function 
wp_print_styles$name ) {
    global 
$pb_styles;
    if ( 
$pb_styles[$name]['printed'] === false ) {
        
$pb_styles[$name]['printed'] = true;
        
        echo 
'<link rel="stylesheet" type="text/css" href="' $pb_styles[$name]['file'] . '?ver=' $pb_styles[$name]['version'] . '">';
    }
}

function 
wp_script_is$name ) {
    global 
$pb_scripts;
    return 
array_key_exists$name$pb_scripts );
}
function 
wp_enqueue_script$name$file$deps = array(), $ver '' ) {
    global 
$pb_scripts;
    
$pb_scripts[$name]['file'] = $file;
    
$pb_scripts[$name]['version'] = $ver;
    
$pb_scripts[$name]['printed'] = false;
}
function 
wp_print_scripts$name ) {
    global 
$pb_scripts;
    if ( 
$pb_scripts[$name]['printed'] === false ) {
        
$pb_scripts[$name]['printed'] = true;
        
        echo 
'<script src="' $pb_scripts[$name]['file'] . '?ver=' $pb_scripts[$name]['version'] . '" type="text/javascript"></script>';
    }
}

function 
add_action$tag$callback ) {
    global 
$pb_actions;
    
$pb_actions[$tag]['callback'] = $callback;
}


function 
is_admin() {
    return 
true;
}

function 
apply_filters$filter$value ) {
    return 
$value;
}

function 
_cleanup_header_comment($str) {
    return 
trim(preg_replace("/\s*(?:\*\/|\?>).*/"''$str));
}

function 
get_plugin_data$plugin_file$markup true$translate true ) {

    
$default_headers = array(
        
'Name' => 'Plugin Name',
        
'PluginURI' => 'Plugin URI',
        
'Version' => 'Version',
        
'Description' => 'Description',
        
'Author' => 'Author',
        
'AuthorURI' => 'Author URI',
        
'TextDomain' => 'Text Domain',
        
'DomainPath' => 'Domain Path',
        
'Network' => 'Network',
        
// Site Wide Only is deprecated in favor of Network.
        
'_sitewide' => 'Site Wide Only',
    );

    
$plugin_data get_file_data$plugin_file$default_headers'plugin' );

    
// Site Wide Only is the old header for Network
    
if ( empty( $plugin_data['Network'] ) && ! empty( $plugin_data['_sitewide'] ) ) {
        
_deprecated_argument__FUNCTION__'3.0'sprintf__'The <code>%1$s</code> plugin header is deprecated. Use <code>%2$s</code> instead.' ), 'Site Wide Only: true''Network: true' ) );
        
$plugin_data['Network'] = $plugin_data['_sitewide'];
    }
    
$plugin_data['Network'] = ( 'true' == strtolower$plugin_data['Network'] ) );
    unset( 
$plugin_data['_sitewide'] );

    
//For backward compatibility by default Title is the same as Name.
    
$plugin_data['Title'] = $plugin_data['Name'];

    if ( 
$markup || $translate )
        
$plugin_data _get_plugin_data_markup_translate$plugin_file$plugin_data$markup$translate );
    else
        
$plugin_data['AuthorName'] = $plugin_data['Author'];

    return 
$plugin_data;
}


function 
get_file_data$file$default_headers$context '' ) {
    
// We don't need to write to the file, so just open for reading.
    
$fp fopen$file'r' );

    
// Pull only the first 8kiB of the file in.
    
$file_data fread$fp8192 );

    
// PHP will close file handle, but we are good citizens.
    
fclose$fp );

    if ( 
$context != '' ) {
        
$extra_headers apply_filters"extra_{$context}_headers", array() );

        
$extra_headers array_flip$extra_headers );
        foreach( 
$extra_headers as $key=>$value ) {
            
$extra_headers[$key] = $key;
        }
        
$all_headers array_merge$extra_headers, (array) $default_headers );
    } else {
        
$all_headers $default_headers;
    }

    foreach ( 
$all_headers as $field => $regex ) {
        
preg_match'/^[ \t\/*#@]*' preg_quote$regex'/' ) . ':(.*)$/mi'$file_data, ${$field});
        if ( !empty( ${
$field} ) )
            ${
$field} = _cleanup_header_comment( ${$field}[1] );
        else
            ${
$field} = '';
    }

    
$file_data compactarray_keys$all_headers ) );

    return 
$file_data;
}


function 
wp_nonce_field() {
    return;
}



// Some PHP installs don't have ngettext. Needed by human_time_diff().
if ( ! function_exists'ngettext' ) ) {
    function 
ngettext$singular$plural$num ) {
        if ( 
$num ) {
            return 
$plural;
        } else {
            return 
$singular;
        }
    }
// End ngettext().



/**
 * Determines the difference between two timestamps.
 *
 * The difference is returned in a human readable format such as "1 hour",
 * "5 mins", "2 days".
 *
 * @since 1.5.0
 *
 * @param int $from Unix timestamp from which the difference begins.
 * @param int $to Optional. Unix timestamp to end the time difference. Default becomes time() if not set.
 * @return string Human readable time difference.
 */
function human_time_diff$from$to '' ) {
    if ( empty(
$to) )
        
$to time();
    
$diff = (int) abs($to $from);
    if (
$diff <= 3600) {
        
$mins round($diff 60);
        if (
$mins <= 1) {
            
$mins 1;
        }
        
/* translators: min=minute */
        
$since sprintfngettext'%s min''%s mins'$mins ), $mins);
    } else if ((
$diff <= 86400) && ($diff 3600)) {
        
$hours round($diff 3600);
        if (
$hours <= 1) {
            
$hours 1;
        }
        
$since sprintfngettext('%s hour''%s hours'$hours ), $hours);
    } elseif (
$diff >= 86400) {
        
$days round($diff 86400);
        if (
$days <= 1) {
            
$days 1;
        }
        
$since sprintfngettext('%s day''%s days'$days ), $days);
    }
    return 
$since;
}



/**
 * Unserialize value only if it was serialized.
 *
 * @since 2.0.0
 *
 * @param string $original Maybe unserialized original, if is needed.
 * @return mixed Unserialized data can be any type.
 */
function maybe_unserialize$original ) {
    if ( 
is_serialized$original ) ) // don't attempt to unserialize data that wasn't serialized going in
        
return @unserialize$original );
    return 
$original;
}






// NOT IMPLEMENTED BUT NON-BLOCKING.

function register_activation_hook() {
}
function 
load_plugin_textdomain() {
}
function 
current_user_can$role ) {
    return 
true;
}
function 
get_temp_dir() {
    
    if ( 
function_exists('sys_get_temp_dir') ) {
        
$temp sys_get_temp_dir();
        if ( @
is_dir$temp ) && is_writable$temp ) )
            return 
rtrim$temp'/\\' ) . '/';
    }
    
    
$temp ABSPATH 'temp/';
    @
mkdir$temp );
    if ( 
is_dir$temp ) && is_writable$temp ) ) {
        return 
$temp;
    }
    
    
$temp '/tmp/';
    @
mkdir$temp );
    return 
$temp;
}


function 
wp_upload_dir() {
    return array( 
'basedir' => ABSPATH );
}



function 
wp_die$message ) {
    
pb_backupbuddy::status'error''wp_die() called with message: ' $message );
    echo 
$message;
    die();
}

function 
wp_load_translations_early() {
}

function 
wp_debug_backtrace_summary() {
}

if ( !
defined('WP_DEBUG') )
    
define'WP_DEBUG'false );
if ( !
defined('WP_DEBUG_DISPLAY') )
    
define'WP_DEBUG_DISPLAY'true );
if ( !
defined('WP_DEBUG_LOG') )
    
define('WP_DEBUG_LOG'false);
if ( !
defined('WP_CACHE') )
    
define('WP_CACHE'false);

function 
admin_url$val ) {
    return 
'?' $val;
}


?>