File: /var/www/intranet.kauko.lt/wp-content/plugins/woffice-core/extensions/woffice-map/helpers.php
<?php
defined( 'ABSPATH' ) || exit;
/**
* Returns the MAP HTML
*
* @return string
*/
function woffice_get_members_map() {
return fw()->extensions->get( 'woffice-map' )->render( 'view' );
}
/**
* Return the location field id
*
* @return array
*/
function woffice_get_the_location_field() {
if (!function_exists('woffice_get_xprofile_table') && !function_exists('bp_is_active'))
return array();
global $wpdb;
$field_name = Woffice_Extension_Map::mapFieldName();
$table_name = woffice_get_xprofile_table('fields');
$sqlStr = "SELECT `id`, `type` FROM $table_name WHERE `name` = '$field_name'";
$field = $wpdb->get_results($sqlStr);
return $field;
}