WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Авторские Темы для WordPress
класс не описан

ACF_Legacy_Locations{} ACF 1.0

Хуков нет.

Возвращает

null. Ничего.

Использование

$ACF_Legacy_Locations = new ACF_Legacy_Locations();
// use class methods

Методы

  1. __call( $name, $arguments )
  2. __get( $key )
  3. __isset( $key )

Код ACF_Legacy_Locations{} ACF 5.9.1

<?php
class ACF_Legacy_Locations {
	
	/**
	 * Magic __isset method for backwards compatibility.
	 *
	 * @date	10/4/20
	 * @since	5.9.0
	 *
	 * @param	string $key Key name.
	 * @return	bool
	 */
	public function __isset( $key ) {
		//_doing_it_wrong( __FUNCTION__, __( 'The ACF_Locations class should not be accessed directly.', 'acf' ), '5.9.0' );
		
		return (
			$key === 'locations'
		);
	}
	
	/**
	 * Magic __get method for backwards compatibility.
	 *
	 * @date	10/4/20
	 * @since	5.9.0
	 *
	 * @param	string $key Key name.
	 * @return	mixed
	 */
	public function __get( $key ) {
		//_doing_it_wrong( __FUNCTION__, __( 'The ACF_Locations class should not be accessed directly.', 'acf' ), '5.9.0' );
		
		switch ( $key ) {
			case 'locations':
				return call_user_func( 'acf_get_location_types' );
		}
		return null;
	}
	
	/**
	 * Magic __call method for backwards compatibility.
	 *
	 * @date	10/4/20
	 * @since	5.9.0
	 *
	 * @param	string $name The method name.
	 * @param	array $arguments The array of arguments.
	 * @return	mixed
	 */
	public function __call( $name, $arguments ) {
		//_doing_it_wrong( __FUNCTION__, __( 'The ACF_Locations class should not be accessed directly.', 'acf' ), '5.9.0' );
		
		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 );
				
		}
    }
}