rep__get_agency_location_name()
This function is used to retrieve the agency location ID associated with a listing or agent based on the provided post ID.
Namespace
REP_Malcolm
Parameters
$agency_lid
int
Agency Location ID
Return
string
Agency location name.
Source
File: \includes\rep-helper-functions.php
function rep__get_agency_location_name( $agency_lid ){
global $wpdb;
$name = "";
if( $agency_lid ){
$sql = "SELECT name FROM {$wpdb->prefix}rep_agency_location WHERE id = {$agency_lid}";
$name = lp__array_key_value( 'name', lp__array_key_value( 0, $wpdb->get_results( $sql , 'ARRAY_A' ) ) );
}
return $name;
}