ACF_Legacy_Location::__constructpublicACF 5.0.0

Constructor.

Method of the class: ACF_Legacy_Location{}

No Hooks.

Returns

null. Nothing (null).

Usage

$ACF_Legacy_Location = new ACF_Legacy_Location();
$ACF_Legacy_Location->__construct();

Changelog

Since 5.0.0 Introduced.

ACF_Legacy_Location::__construct() code ACF 6.0.4

public function __construct() {

	// Add legacy method filters.
	if ( method_exists( $this, 'rule_match' ) ) {
		add_filter( "acf/location/rule_match/{$this->name}", array( $this, 'rule_match' ), 5, 3 );
	}
	if ( method_exists( $this, 'rule_operators' ) ) {
		add_filter( "acf/location/rule_operators/{$this->name}", array( $this, 'rule_operators' ), 5, 2 );
	}
	if ( method_exists( $this, 'rule_values' ) ) {
		add_filter( "acf/location/rule_values/{$this->name}", array( $this, 'rule_values' ), 5, 2 );
	}
}