123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?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 );
- }
- }
- }
- endif;
|