ACF_Location_Post::match() public ACF 5.9.0
Matches the provided rule against the screen args returning a bool result.
{} Это метод класса: ACF_Location_Post{}
Хуков нет.
Возвращает
true/false.
Использование
$ACF_Location_Post = new ACF_Location_Post(); $ACF_Location_Post->match( $rule, $screen, $field_group );
- $rule(массив) (обязательный)
- The location rule.
- $screen(массив) (обязательный)
- The screen args.
- $field_group(массив) (обязательный)
- The field group settings.
Список изменений
С версии 5.9.0 | Введена. |
Код ACF_Location_Post::match() ACF Location Post::match ACF 5.9.1
public function match( $rule, $screen, $field_group ) {
// Check screen args.
if( isset($screen['post_id']) ) {
$post_id = $screen['post_id'];
} else {
return false;
}
// Compare rule against post_id.
return $this->compare_to_rule( $post_id, $rule );
}