RWMB_Map_Field::get_value PHP Method

get_value() static public method

Get the field value The difference between this function and 'meta' function is 'meta' function always returns the escaped value of the field saved in the database, while this function returns more meaningful value of the field
static public get_value ( array $field, array $args = [], integer | null $post_id = null ) : mixed
$field array Field parameters
$args array Not used for this field
$post_id integer | null Post ID. null for current post. Optional.
return mixed Array(latitude, longitude, zoom)
    static function get_value($field, $args = array(), $post_id = null)
    {
        $value = parent::get_value($field, $args, $post_id);
        list($latitude, $longitude, $zoom) = explode(',', $value . ',,');
        return compact('latitude', 'longitude', 'zoom');
    }