Make WordPress Core

Changeset 11987


Ignore:
Timestamp:
10/01/2009 05:41:09 PM (16 years ago)
Author:
ryan
Message:

Localize default strings for edit_comment_link() and edit_post_link(). fixes #10879

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r11956 r11987  
    721721 * @param int $id Optional. Post ID.
    722722 */
    723 function edit_post_link( $link = 'Edit This', $before = '', $after = '', $id = 0 ) {
     723function edit_post_link( $link = null, $before = '', $after = '', $id = 0 ) {
    724724    if ( !$post = &get_post( $id ) )
    725725        return;
     
    727727    if ( !$url = get_edit_post_link( $post->ID ) )
    728728        return;
     729
     730    if ( null === $link )
     731        $link = __('Edit This');
    729732
    730733    $link = '<a class="post-edit-link" href="' . $url . '" title="' . esc_attr( __( 'Edit post' ) ) . '">' . $link . '</a>';
     
    818821 * @return string|null HTML content, if $echo is set to false.
    819822 */
    820 function edit_comment_link( $link = 'Edit This', $before = '', $after = '' ) {
     823function edit_comment_link( $link = null, $before = '', $after = '' ) {
    821824    global $comment, $post;
    822825
     
    828831            return;
    829832    }
     833
     834    if ( null === $link )
     835        $link = __('Edit This');
    830836
    831837    $link = '<a class="comment-edit-link" href="' . get_edit_comment_link( $comment->comment_ID ) . '" title="' . __( 'Edit comment' ) . '">' . $link . '</a>';
Note: See TracChangeset for help on using the changeset viewer.