Пример #1
0
 /**
  * Updates an existing Gistpen on Gist
  *
  * @return string|WP_Error Gist ID on success, WP_Error on failure
  * @since 0.5.0
  */
 protected function update_gist($commit)
 {
     $response = $this->gist->update_gist($commit);
     if (is_wp_error($response)) {
         return $response;
     }
     $result = $this->database->persist('commit')->set_gist_id($commit->get_ID(), $response['history'][0]['version']);
     if (is_wp_error($result)) {
         return $result;
     }
     return $response;
 }