public function test_should_build_github_edit_url() { $post = new WordPress_GitHub_Sync_Post($this->id, $this->api); $this->assertEquals('https://github.com/owner/repo/edit/master/_posts/' . get_the_date('Y-m-d-', $this->id) . $this->post->post_name . '.md', $post->github_edit_url()); }
public function test_should_return_global_post_edit_url() { $this->assertEquals($this->post->github_edit_url(), get_the_github_edit_url()); }
/** * Returns the URL to edit the current post on GitHub. * * @return string */ function get_the_github_edit_url() { $wpghs_post = new WordPress_GitHub_Sync_Post(get_the_ID()); return $wpghs_post->github_edit_url(); }