Пример #1
0
 /**
  * Use the new tree to save sha data
  * for all the updated posts
  */
 public function save_post_shas()
 {
     foreach ($this->ids as $post_id) {
         $post = new WordPress_GitHub_Sync_Post($post_id);
         $blob = $this->tree->get_blob_for_path($post->github_path());
         if ($blob) {
             $post->set_sha($blob->sha);
         } else {
             WordPress_GitHub_Sync::write_log(sprintf(__('No sha matched for post ID %d', 'wordpress-github-sync'), $post_id));
         }
     }
 }