Contactable\SWV
Rule::matches
Returns true if this rule matches the given context.
Метод класса: Rule{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Rule = new Rule(); $Rule->matches( $context );
- $context(массив) (обязательный)
- Context.
Код Rule::matches() Rule::matches CF7 6.1.3
public function matches( $context ) {
$field = $this->get_property( 'field' );
if ( ! empty( $context['field'] ) ) {
if ( $field and ! in_array( $field, (array) $context['field'], true ) ) {
return false;
}
}
return true;
}