Edit comment from Ryan Boren.
git-svn-id: http://svn.automattic.com/wordpress/trunk@673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -562,6 +562,24 @@ function edit_post_link($link = 'Edit This', $before = '', $after = '') {
|
||||
echo "$before <a href='$location'>$link</a> $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 <a href='$location'>$link</a> $after";
|
||||
}
|
||||
|
||||
/***** Date/Time tags *****/
|
||||
|
||||
function the_date_xml() {
|
||||
|
||||
Reference in New Issue
Block a user