Ticket #940 (closed defect: fixed)

Opened 3 months ago

Last modified 3 months ago

post_author_title_link filter fires twice, should be get_post_author_title_link

Reported by: _ck_ Assigned to:
Priority: normal Milestone: 1.0-beta & XML-RPC
Component: Back-end Version:
Severity: normal Keywords:
Cc:

Description

Around line 1459 you have get_post_author_title_link using the filter action of just "post_author_title_link" (without the get).

Since the display non-get function also fires the same filter, it performs the filter twice. Should instead be "get_post_author_title_link".

Oh and you broke a few of my plugins just by changing this function name used in the post.php template :-(

function post_author_title_link( $post_id = 0 ) {
	echo apply_filters( 'post_author_title_link', get_post_author_title_link( $post_id ), get_post_id( $post_id ) );
}

function get_post_author_title_link( $post_id = 0 ) {
	$title = get_post_author_title( $post_id );
	if ( false === $title )
		$r = __('Unregistered'); // This should never happen
	else
		$r = '<a href="' . attribute_escape( get_user_profile_link( get_post_author_id( $post_id ) ) ) . '">' . $title . '</a>';

	echo apply_filters( 'post_author_title_link', $r, get_post_id( $post_id ) );
}

Change History

08/26/08 21:23:53 changed by mdawaffe

  • status changed from new to closed.
  • resolution set to fixed.

(In [1661]) get_post_author_title_link filter. Fixes #940