PluginProbe ʕ •ᴥ•ʔ
Secure Custom Fields / 6.9.1
Secure Custom Fields v6.9.1
6.9.1 6.9.0 6.8.9 6.8.7 6.8.8 6.8.6 6.8.4 6.8.5 trunk 6.4.0-beta1 6.4.0-beta2 6.4.1 6.4.1-beta3 6.4.1-beta4 6.4.1-beta5 6.4.1-beta6 6.4.1-beta7 6.4.2 6.5.0 6.5.1 6.5.2 6.5.3 6.5.4 6.5.5 6.5.6 6.5.7 6.6.0 6.7.0 6.7.1 6.8.0 6.8.1 6.8.2 6.8.3
secure-custom-fields / includes / legacy / legacy-locations.php
secure-custom-fields / includes / legacy Last commit date
index.php 1 year ago legacy-locations.php 1 year ago
legacy-locations.php
69 lines
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit; // Exit if accessed directly
5 }
6
7 if ( ! class_exists( 'ACF_Legacy_Locations' ) ) :
8
9 class ACF_Legacy_Locations {
10
11 /**
12 * Magic __isset method for backwards compatibility.
13 *
14 * @date 10/4/20
15 * @since ACF 5.9.0
16 *
17 * @param string $key Key name.
18 * @return boolean
19 */
20 public function __isset( $key ) {
21 // _doing_it_wrong( __FUNCTION__, __( 'The ACF_Locations class should not be accessed directly.', 'secure-custom-fields' ), '5.9.0' );
22 return (
23 $key === 'locations'
24 );
25 }
26
27 /**
28 * Magic __get method for backwards compatibility.
29 *
30 * @date 10/4/20
31 * @since ACF 5.9.0
32 *
33 * @param string $key Key name.
34 * @return mixed
35 */
36 public function __get( $key ) {
37 // _doing_it_wrong( __FUNCTION__, __( 'The ACF_Locations class should not be accessed directly.', 'secure-custom-fields' ), '5.9.0' );
38 switch ( $key ) {
39 case 'locations':
40 return call_user_func( 'acf_get_location_types' );
41 }
42 return null;
43 }
44
45 /**
46 * Magic __call method for backwards compatibility.
47 *
48 * @date 10/4/20
49 * @since ACF 5.9.0
50 *
51 * @param string $name The method name.
52 * @param array $arguments The array of arguments.
53 * @return mixed
54 */
55 public function __call( $name, $arguments ) {
56 // _doing_it_wrong( __FUNCTION__, __( 'The ACF_Locations class should not be accessed directly.', 'secure-custom-fields' ), '5.9.0' );
57 switch ( $name ) {
58 case 'register_location':
59 return call_user_func_array( 'acf_register_location_type', $arguments );
60 case 'get_location':
61 return call_user_func_array( 'acf_get_location_type', $arguments );
62 case 'get_locations':
63 return call_user_func_array( 'acf_get_location_rule_types', $arguments );
64 }
65 }
66 }
67
68 endif; // class_exists check
69