Function Reference: geodir_filter_widget_listings_orderby_set

Summary

Adds the location filter to the orderby clause.

Package

GeoDirectory_Location_Manager

Parameters

$orderby
(string) (required) Order by clause string.

Default: None
$table
(string) (required) Table name.

Default: None

Return Values

(string)
  • Filtered Orderby Clause.

Change Log

Since: 1.0.0

Source File

geodir_filter_widget_listings_orderby_set() is located in geodir_location_manager/geodir_location_hooks_actions.php [Line: 1507]

Source Code

function geodir_filter_widget_listings_orderby_set($orderby,$table){
	// my location set start
	if(isset($_SESSION['all_near_me'])){
	$orderby = " distance, ".$orderby;
	}
	return $orderby;	
}