public function test_should_return_global_post_view_link()
 {
     $this->assertEquals(sprintf('<a href="%s">%s</a>', get_the_github_view_url(), 'View this post on GitHub.'), get_the_github_view_link());
 }
Esempio n. 2
0
/**
 * Returns the HTML markup to view the current post on GitHub.
 *
 * @return string
 */
function get_the_github_view_link()
{
    return '<a href="' . get_the_github_view_url() . '">' . apply_filters('wpghs_view_link_text', 'View this post on GitHub.') . '</a>';
}