ACF_Legacy_Location::__call()publicACF 5.9.0

Magic __call method for backwards compatibility.

Метод класса: ACF_Legacy_Location{}

Хуков нет.

Возвращает

Разное.

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

$ACF_Legacy_Location = new ACF_Legacy_Location();
$ACF_Legacy_Location->__call( $name, $arguments );
$name(строка) (обязательный)
The method name.
$arguments(массив) (обязательный)
The array of arguments.

Список изменений

С версии 5.9.0 Введена.

Код ACF_Legacy_Location::__call() ACF 6.0.4

public function __call( $name, $arguments ) {

	// Add backwards compatibility for legacy methods.
	// - Combine 3x legacy filters cases together (remove first args).
	switch ( $name ) {
		case 'rule_match':
			$method       = isset( $method ) ? $method : 'match';
			$arguments[3] = isset( $arguments[3] ) ? $arguments[3] : false; // Add $field_group param.
		case 'rule_operators':
			$method = isset( $method ) ? $method : 'get_operators';
		case 'rule_values':
			$method = isset( $method ) ? $method : 'get_values';
			array_shift( $arguments );
			return call_user_func_array( array( $this, $method ), $arguments );
		case 'compare':
			return call_user_func_array( array( $this, 'compare_to_rule' ), $arguments );
	}
}