acf_get_internal_post_type_posts()
Returns and array of ACF posts for the given $filter.
Хуков нет.
Возвращает
Массив
.
Использование
acf_get_internal_post_type_posts( $post_type, $filter );
- $post_type(строка)
- The ACF post type to get posts for.
По умолчанию: 'acf-field-group' - $filter(массив)
- An array of args to filter results by.
По умолчанию: array()
Список изменений
С версии 6.1 | Введена. |
Код acf_get_internal_post_type_posts() acf get internal post type posts ACF 6.4.2
function acf_get_internal_post_type_posts( $post_type = 'acf-field-group', $filter = array() ) { $posts = array(); $instance = acf_get_internal_post_type_instance( $post_type ); if ( $instance ) { $posts = $instance->get_posts( $filter ); } return $posts; }