コード例 #1
0
 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());
 }
コード例 #2
0
ファイル: helpers.php プロジェクト: rexcode/rexappz-wordpress
/**
 * 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>';
}