function wpa_wpc_ajax_delete() { check_ajax_referer('wpclone-ajax-submit', 'nonce'); if (isset($_REQUEST['fileid']) && !empty($_REQUEST['fileid'])) { echo json_encode(DeleteWPBackupZip($_REQUEST['fileid'])); } wp_die(); }
if (false === $wp_filesystem->chmod($wpconfig)) { wpa_backup_error('wpconfig', sprintf(__("<code>%s</code> is not writable and wpclone was unable to change the file permissions."), $wpconfig), true); } } $fileContent = $wp_filesystem->get_contents($wpconfig); $pos = strpos($fileContent, '$table_prefix'); $str = substr($fileContent, $pos, strpos($fileContent, PHP_EOL, $pos) - $pos); $fileContent = str_replace($str, '$table_prefix = "' . $newPrefix . '";', $fileContent); $wp_filesystem->put_contents($wpconfig, $fileContent, 0600);
/** * @since 2.0.6 */ function wpa_remove_backup() { check_admin_referer('wpclone-submit'); $deleteRow = DeleteWPBackupZip($_REQUEST['del']); echo $deleteRow['msg']; }