From 622e22e5bb36398ffb1591702162eefaaec7fe7c Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Thu, 1 Jan 2004 00:20:22 +0000 Subject: [PATCH] Edit comment from Ryan Boren. git-svn-id: https://develop.svn.wordpress.org/trunk@673 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-comments.php | 2 +- wp-includes/template-functions.php | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/wp-comments.php b/wp-comments.php index 399f8588aa..cb8770d8c2 100644 --- a/wp-comments.php +++ b/wp-comments.php @@ -33,7 +33,7 @@
  • -

    by @

    +

    by @

  • diff --git a/wp-includes/template-functions.php b/wp-includes/template-functions.php index 5dfe42b31c..bef4725506 100644 --- a/wp-includes/template-functions.php +++ b/wp-includes/template-functions.php @@ -562,6 +562,24 @@ function edit_post_link($link = 'Edit This', $before = '', $after = '') { echo "$before $link $after"; } +function edit_comment_link($link = 'Edit This', $before = '', $after = '') { + global $user_level, $post, $comment, $siteurl; + + get_currentuserinfo(); + + if ($user_level > 0) { + $authordata = get_userdata($post->post_author); + if ($user_level < $authordata->user_level) { + return; + } + } else { + return; + } + + $location = "$siteurl/wp-admin/post.php?action=editcomment&comment=$comment->comment_ID"; + echo "$before $link $after"; +} + /***** Date/Time tags *****/ function the_date_xml() {