BP_Messages_Thread::convert_orderby_to_order_by_term( string $orderby )

Convert the ‘orderby’ param into a proper SQL term/column.

Description

Parameters

$orderby

(Required) Orderby term as passed to get().

Return

(string) $order_by_term SQL-friendly orderby term.

Source

File: bp-messages/classes/class-bp-messages-thread.php

1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
protected static function convert_orderby_to_order_by_term( $orderby ) {
    $order_by_term = '';
 
    switch ( $orderby ) {
        case 'id':
        default:
            $order_by_term = 'r.id';
            break;
    }
 
    return $order_by_term;
}

Changelog

Changelog
Version Description
BuddyPress 1.8.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.