acf_is_field_key()
acf_is_field_key
Returns true if the given identifier is a field key.
Хуки из функции
Возвращает
true|false.
Использование
acf_is_field_key( $id );
- $id(строка)
- The identifier.
По умолчанию:''
Список изменений
| С версии 5.0.0 | Введена. |
Код acf_is_field_key() acf is field key ACF 6.4.2
function acf_is_field_key( $id = '' ) {
// Check if $id is a string starting with "field_".
if ( is_string( $id ) && substr( $id, 0, 6 ) === 'field_' ) {
return true;
}
/**
* Filters whether the $id is a field key.
*
* @date 23/1/19
* @since 5.7.10
*
* @param bool $bool The result.
* @param string $id The identifier.
*/
return apply_filters( 'acf/is_field_key', false, $id );
}