Function Reference: get_actual_location_name

Summary

Get actual location name.

Package

GeoDirectory_Location_Manager

Parameters

($type) (required)

Default: None
($term) (required)

Default: None
$translated
(bool) (required)

Default: None

Return Values

(null|string|void)

    Change Log

    Since: 1.0.0

    Source File

    get_actual_location_name() is located in geodir_location_manager/geodir_location_functions.php [Line: 2504]

    Source Code

    function get_actual_location_name($type, $term, $translated=false) {
    	if ($type=='' || $term=='') {
    		return NULL;
    	}
    	$row = geodir_get_locations($type, $term);
    	$value = !empty($row) && !empty($row[0]) && isset($row[0]->$type) ? $row[0]->$type : '';
    	if( $translated ) {
    		$value = __( $value, GEODIRECTORY_TEXTDOMAIN );
    	}
    	return $value;
    }