Пример #1
0
 /**
  * Updates used and total quota.
  */
 private function update_quota()
 {
     if (is_wp_error($e = $this->need_gdocs())) {
         $this->log_wp_error($e);
         return;
     }
     $quota_used = $this->gdocs->get_quota_used();
     if (is_wp_error($quota_used)) {
         $this->log_wp_error($quota_used);
     } else {
         $this->options['quota_used'] = $quota_used;
     }
     $quota_total = $this->gdocs->get_quota_total();
     if (is_wp_error($quota_total)) {
         $this->log_wp_error($quota_total);
     } else {
         $this->options['quota_total'] = $quota_total;
     }
 }