[Bb-trac]
[bbPress] #940: post_author_title_link filter fires twice,
should be get_post_author_title_link
bbPress
bb-trac at lists.bbpress.org
Wed Aug 20 14:12:49 GMT 2008
#940: post_author_title_link filter fires twice, should be
get_post_author_title_link
----------------------+-----------------------------------------------------
Reporter: _ck_ | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 1.0-beta & XML-RPC
Component: Back-end | Version:
Severity: normal | Keywords:
----------------------+-----------------------------------------------------
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 ) );
}
}}}
--
Ticket URL: <http://trac.bbpress.org/ticket/940>
bbPress <http://bbpress.org/>
Innovative forum development
More information about the Bb-trac
mailing list