/var/www/(Del)hsihk.com/wp-content/plugins/backupbuddy/controllers/ajax/refresh_zip_methods.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
<?php
if ( ! is_admin() ) { die( 'Access denied.' ); }

// Server info page available zip methods update.

/* refresh_zip_methods()
*
* Server Info page refreshing available zip methods. Useful since these are normally cached.
*
*/

// Make sure the legacy method transient is gone
delete_transient'pb_backupbuddy_avail_zip_methods_classic' );

if ( !isset( 
pb_backupbuddy::$classes['zipbuddy'] ) ) {

    
// We don't have an instance of zipbuddy so make sure we can create one
    
require_once( pb_backupbuddy::plugin_path() . '/lib/zipbuddy/zipbuddy.php' );
    
    
// Find out the transient name(s) and delete them
    
$transients pluginbuddy_zipbuddy::get_transient_names_static();
    foreach ( 
$transients as $transient ) {
    
        
delete_transient$transient );
        
    }
    
    
// Instantiating a class object will renew the deleted method transient
    
pb_backupbuddy::$classes['zipbuddy'] = new pluginbuddy_zipbuddyABSPATH );
    
} else {

    
// We have an instance of zipbuddy so we can use it
    // Find out the transient name(s) and delete them
    
$transients pluginbuddy_zipbuddy::get_transient_names_static();
    foreach ( 
$transients as $transient ) {
    
        
delete_transient$transient );
        
    }
    
    
// Just call the refresh function
    
pb_backupbuddy::$classes['zipbuddy']->refresh_zip_methods();
    
}

// Now simply provide the list of methods
echo implode', 'pb_backupbuddy::$classes['zipbuddy']->_zip_methods );

die();