Make WordPress Core

Opened 15 years ago

Closed 14 years ago

#14141 closed defect (bug) (fixed)

Parameter usage in edit_bookmark_link

Reported by: linguasite's profile linguasite Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0
Component: Template Keywords: needs-patch
Focuses: Cc:

Description

The function edit_bookmark_link in /wp_includes/link-template.php accepts the following parameters:

edit_bookmark_link( $link = '', $before = '', $after = '', $bookmark = null )

Internally, the first parameter $link is used as the link_id:
Line 957:

$link = '<a href="' . get_edit_bookmark_link( $link ) . '" title="' . __( 'Edit Link' ) . '">' . $link . '</a>';

As I understand the function, this parameter should be the link text. As a result, the only way to use this function is to provide the link_id as the first paramter and get the link_id as link text in the output.

This version should work better:

Line 957:

$link = '<a href="' . get_edit_bookmark_link( $bookmark ) . '" title="' . __( 'Edit Link' ) . '">' . $link . '</a>';

Change History (2)

#1 @nacin
14 years ago

  • Keywords needs-patch added; link bookmark template removed
  • Milestone changed from Awaiting Review to 3.1

Looks sane.

#2 @nacin
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [16030]) Use correct variable. props linguasite, fixes #14141.

Note: See TracTickets for help on using tickets.