From faead879c73a2f2f941b6bb23ca4ca6cb507232b Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 1 Oct 2009 17:41:09 +0000 Subject: [PATCH] Localize default strings for edit_comment_link() and edit_post_link(). fixes #10879 git-svn-id: https://develop.svn.wordpress.org/trunk@11987 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/link-template.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 26c0281b35..268cbed743 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -720,13 +720,16 @@ function get_edit_post_link( $id = 0, $context = 'display' ) { * @param string $after Optional. Display after edit link. * @param int $id Optional. Post ID. */ -function edit_post_link( $link = 'Edit This', $before = '', $after = '', $id = 0 ) { +function edit_post_link( $link = null, $before = '', $after = '', $id = 0 ) { if ( !$post = &get_post( $id ) ) return; if ( !$url = get_edit_post_link( $post->ID ) ) return; + if ( null === $link ) + $link = __('Edit This'); + $link = '' . $link . ''; echo $before . apply_filters( 'edit_post_link', $link, $post->ID ) . $after; } @@ -817,7 +820,7 @@ function get_edit_comment_link( $comment_id = 0 ) { * @param string $after Optional. Display after edit link. * @return string|null HTML content, if $echo is set to false. */ -function edit_comment_link( $link = 'Edit This', $before = '', $after = '' ) { +function edit_comment_link( $link = null, $before = '', $after = '' ) { global $comment, $post; if ( $post->post_type == 'page' ) { @@ -828,6 +831,9 @@ function edit_comment_link( $link = 'Edit This', $before = '', $after = '' ) { return; } + if ( null === $link ) + $link = __('Edit This'); + $link = '' . $link . ''; echo $before . apply_filters( 'edit_comment_link', $link, $comment->comment_ID ) . $after; }