bp_ps_xprofile_sort_directory( $sql, $object, $f, $order )
Return $sql of BuddyBoss Profile Search Extended sort directory.
Description
Source
File: bp-core/profile-search/bps-xprofile.php
function bp_ps_xprofile_sort_directory ($sql, $object, $f, $order)
{
global $bp, $wpdb;
$object->uid_name = 'user_id';
$object->uid_table = $bp->profile->table_name_data;
$sql['select'] = "SELECT u.user_id AS id FROM {$object->uid_table} u";
$sql['where'] = str_replace ('u.ID', 'u.user_id', $sql['where']);
$sql['where'][] = "u.user_id IN (SELECT ID FROM {$wpdb->users} WHERE user_status = 0)";
$sql['where'][] = $wpdb->prepare ("u.field_id = %d", $f->id);
$sql['orderby'] = "ORDER BY u.value";
$sql['order'] = $order;
return $sql;
}
Changelog
| Version | Description |
|---|---|
| BuddyBoss 1.0.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.