ACF_Internal_Post_Type::is_post_key
Returns true if the given identifier is an ACF post key.
Метод класса: ACF_Internal_Post_Type{}
Хуки из метода
Возвращает
true|false
.
Использование
$ACF_Internal_Post_Type = new ACF_Internal_Post_Type(); $ACF_Internal_Post_Type->is_post_key( $id );
- $id(строка)
- The identifier.
По умолчанию: ''
Список изменений
С версии 6.1 | Введена. |
Код ACF_Internal_Post_Type::is_post_key() ACF Internal Post Type::is post key ACF 6.4.2
public function is_post_key( $id = '' ) { // Check if $id is a string starting with $this->post_key. if ( is_string( $id ) && substr( $id, 0, strlen( $this->post_key_prefix ) ) === $this->post_key_prefix ) { return true; } /** * Filters whether the $id is an ACF post key. * * @date 23/1/19 * @since 5.7.10 * * @param bool $bool The result. * @param string $id The identifier. */ return apply_filters( "acf/is_{$this->hook_name}_key", false, $id, $this->post_type ); }