public function test_should_return_global_post_edit_link()
 {
     $this->assertEquals(sprintf('<a href="%s">%s</a>', get_the_github_edit_url(), 'Edit this post on GitHub.'), get_the_github_edit_link());
 }
Esempio n. 2
0
/**
 * Returns the HTML markup to edit the current post on GitHub.
 *
 * @return string
 */
function get_the_github_edit_link()
{
    return '<a href="' . get_the_github_edit_url() . '">' . apply_filters('wpghs_edit_link_text', 'Edit this post on GitHub.') . '</a>';
}