bp_ps_uid_clauses( $sql,  $object )

Returns BuddyBoss Profile Search sql with added directory member item clauses.

Description

Source

File: bp-core/profile-search/bps-directory.php

 function bp_ps_uid_clauses ($sql, $object)
{
	$code = $object->query_vars['type'];
	$order = 'ASC';
	if ($code[0] == '-')
	{
		$code = substr ($code, 1);
		$order = 'DESC';
	}

	list (, $fields) = bp_ps_get_fields ();
	if (isset ($fields[$code]->sort_directory) && is_callable ($fields[$code]->sort_directory))
	{
		$f = $fields[$code];
		$sql = call_user_func ($f->sort_directory, $sql, $object, $f, $order);
		add_action ('bp_directory_members_item', 'bp_ps_directory_members_item');
	}

	return $sql;
}

Changelog

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.