<?php

if (!defined('ABSPATH')) {
    exit;
}
if (!class_exists('ACF_Legacy_Locations')) {
    class ACF_Legacy_Locations
    {
        public function __isset($key)
        {
            return $key === 'locations';
        }
        public function __get($key)
        {
            switch ($key) {
                case 'locations':
                    return call_user_func('acf_get_location_types');
            }
            return null;
        }
        public function __call($name, $arguments)
        {
            switch ($name) {
                case 'register_location':
                    return call_user_func_array('acf_register_location_type', $arguments);
                case 'get_location':
                    return call_user_func_array('acf_get_location_type', $arguments);
                case 'get_locations':
                    return call_user_func_array('acf_get_location_rule_types', $arguments);
            }
        }
    }
}