Skip to:
Content

Opened 5 years ago

Closed 5 years ago

#1049 closed enhancement (wontfix)

Add a filter to allow displaying threads in reverse order

Reported by: johnbillion Owned by: johnbillion
Milestone: Priority: normal
Severity: minor Version: 1.0-rc-2
Component: Front-end Keywords: thread, reverse, filter, apply_filters, has-patch
Cc:

Description

In reponse to a support forum thread here: http://bbpress.org/forums/topic/reverse-the-display-of-the-messages

The get_thread() function allows a third parameter which, when set, reverses the order of the thread. Let's put a filter on this parameter inside the function which will allow a plugin to reverse the order of the thread.

Attachments (1)

bb1049.patch (573 bytes) - added by johnbillion 5 years ago.

Download all attachments as: .zip

Change History (5)

johnbillion5 years ago

comment:1 johnbillion5 years ago

  • Keywords has-patch added

Patch.

comment:2 johnbillion5 years ago

At it's most basic, a plugin can reverse the thread order like this:

add_filter( 'reverse_thread', create_function( '$a', 'return true;' ) );

In most cases, a complete plugin will contain conditionals to determine when to reverse the thread order (eg. based on a user setting or a URL parameter).

comment:3 johnbillion5 years ago

  • Milestone set to 1.0-beta & XML-RPC

comment:4 sambauers5 years ago

  • Milestone 1.0-beta deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Filtering on "get_thread_order_by" will allow this. No need for the extra filter.

Note: See TracTickets for help on using tickets.