當前位置: 首頁>>代碼示例>>PHP>>正文


PHP pb_backupbuddy_destinations::listFiles方法代碼示例

本文整理匯總了PHP中pb_backupbuddy_destinations::listFiles方法的典型用法代碼示例。如果您正苦於以下問題:PHP pb_backupbuddy_destinations::listFiles方法的具體用法?PHP pb_backupbuddy_destinations::listFiles怎麽用?PHP pb_backupbuddy_destinations::listFiles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pb_backupbuddy_destinations的用法示例。


在下文中一共展示了pb_backupbuddy_destinations::listFiles方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: update_option

    update_option('_transient_doing_cron', 0);
    // Prevent cron-blocking for next item.
}
// Delete selected dropbox backup(s) from form submission.
if ('delete_backup' == pb_backupbuddy::_POST('bulk_action')) {
    pb_backupbuddy::verify_nonce();
    if (is_array(pb_backupbuddy::_POST('items'))) {
        if (true === ($result = pb_backupbuddy_destinations::delete($destination, pb_backupbuddy::_POST('items')))) {
            pb_backupbuddy::alert(__('Selected file(s) deleted.', 'it-l10n-backupbuddy'));
        } else {
            pb_backupbuddy::alert(__('Unable to delete one or more files. Details: ', 'it-l10n-backupbuddy') . $result);
        }
        echo '<br>';
    }
}
$files_result = pb_backupbuddy_destinations::listFiles($destination);
$backup_files = array();
foreach ((array) $files_result['contents'] as $file) {
    // Loop through files looking for backups.
    if ($file['is_dir'] == '1') {
        // Do NOT display subdirectories.
        continue;
    }
    $filename = str_ireplace($files_result['path'] . '/', '', $file['path']);
    // Remove path from filename.
    if (isset($file['client_mtime'])) {
        $last_modified = strtotime($file['client_mtime']);
        $last_modified = pb_backupbuddy::$format->date(pb_backupbuddy::$format->localize_time($last_modified)) . '<br /><span class="description">(' . pb_backupbuddy::$format->time_ago($last_modified) . ' ago)</span>';
    } else {
        $last_modified = '<i>' . __('Unknown', 'it-l10n-backupbuddy') . '</i>';
    }
開發者ID:Ezyva2015,項目名稱:SMSF-Academy-Wordpress,代碼行數:31,代碼來源:_manage.php


注:本文中的pb_backupbuddy_destinations::listFiles方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。