Skip to:
Content

bbPress.org

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1787 closed enhancement (fixed)

New filters for bbp_is_topic_XXXX

Reported by: MZAWeb Owned by:
Priority: normal Milestone: 2.1
Component: API - Actions/Filters Version: 2.0
Severity: normal Keywords:
Cc:

Description

bbp_is_reply_published, for instance, has a filter in place:

function bbp_is_reply_published( $reply_id = 0 ) {
	$reply_status = bbp_get_reply_status( bbp_get_reply_id( $reply_id ) );
	return apply_filters( 'bbp_is_reply_published', bbp_get_public_status_id() == $reply_status, $reply_id );
}

But bbp_is_topic_published doesn't:

function bbp_is_topic_published( $topic_id = 0 ) {
    $topic_status = bbp_get_topic_status( bbp_get_topic_id( $topic_id ) );
    return bbp_get_public_status_id() == $topic_status;
}

Attachments (2)

bbp_is_topic_published.diff​ (505 bytes ) - added by MZAWeb 15 years ago.
Filter added
filters.diff​ (3.4 KB ) - added by MZAWeb 15 years ago.

Download all attachments as: .zip

Change History (8)

#1 @MZAWeb
15 years ago

  • Keywords has-patch added

#2 @MZAWeb
15 years ago

  • Summary New filter for bbp_is_topic_published → New filters for bbp_is_topic_XXXX

Added filters also for:

 function bbp_is_topic_closed
 function bbp_is_topic_published
 function bbp_is_topic_spam
 function bbp_is_topic_trash
 function bbp_is_topic_anonymous

#3 @jaredatch
15 years ago

Looks alright to me.

#4 @johnjamesjacoby
15 years ago

  • Resolution → fixed
  • Status new → closed

(In [3805]) Add missing filters to some topic template tags.

  • Remove inline logic from within some apply_filters() calls
  • Props MZAWeb for initial patch
  • Fixes #1787

#5 @johnjamesjacoby
15 years ago

  • Milestone Awaiting Review → 2.1

#6 @johnjamesjacoby
15 years ago

  • Keywords has-patch removed
Note: See TracTickets for help on using tickets.