acf_field::add_field_filterpublicACF 5.4.0

Adds a filter specific to the current field type.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$acf_field = new acf_field();
$acf_field->add_field_filter( $tag, $function_to_add, $priority, $accepted_args );
$tag(строка)
The name of the filter to add the callback to.
По умолчанию: ''
$function_to_add(строка)
The callback to be run when the filter is applied.
По умолчанию: ''
$priority(int)
The priority to add the filter on.
По умолчанию: 10
$accepted_args(int)
The number of args to pass to the function.
По умолчанию: 1

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

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

Код acf_field::add_field_filter() ACF 6.4.2

public function add_field_filter( $tag = '', $function_to_add = '', $priority = 10, $accepted_args = 1 ) {
	// Append the field type name to the tag before adding the filter.
	$tag .= '/type=' . $this->name;
	$this->add_filter( $tag, $function_to_add, $priority, $accepted_args );
}