From 93b3ed391504eed481dd4ddfc28436dca75b6809 Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@11987 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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; }