ACF_Location_Comment::matchpublicACF 5.9.0

Matches the provided rule against the screen args returning a bool result.

Method of the class: ACF_Location_Comment{}

No Hooks.

Returns

true|false.

Usage

$ACF_Location_Comment = new ACF_Location_Comment();
$ACF_Location_Comment->match( $rule, $screen, $field_group );
$rule(array) (required)
The location rule.
$screen(array) (required)
The screen args.
$field_group(array) (required)
The field group settings.

Changelog

Since 5.9.0 Introduced.

ACF_Location_Comment::match() code ACF 6.0.4

public function match( $rule, $screen, $field_group ) {

	// Check screen args.
	if ( isset( $screen['comment'] ) ) {
		$comment = $screen['comment'];
	} else {
		return false;
	}
	return $this->compare_to_rule( $comment, $rule );
}