acf_field_type_supports()
Returns the value of a field type "supports" property.
Хуков нет.
Возвращает
Разное. The value of the supports property which may be false, or $default on failure.
Использование
acf_field_type_supports( $name, $prop, $default );
- $name(строка)
- The name of the field type.
По умолчанию:'' - $prop(строка)
- The name of the supports property.
По умолчанию:'' - $default(разное)
- The default value if the property is not set.
По умолчанию:false
Список изменений
| С версии 6.2.5 | Введена. |
Код acf_field_type_supports() acf field type supports ACF 6.4.2
function acf_field_type_supports( $name = '', $prop = '', $default = false ) {
$supports = acf_get_field_type_prop( $name, 'supports' );
if ( ! is_array( $supports ) ) {
return $default;
}
return isset( $supports[ $prop ] ) ? $supports[ $prop ] : $default;
}