acf_filter_internal_post_type_posts()
Returns a filtered array of ACF posts based on the given $args.
Хуков нет.
Возвращает
array.
Использование
acf_filter_internal_post_type_posts( $posts, $args, $post_type );
- $posts(массив) (обязательный)
- An array of ACF posts.
- $args(массив)
- An array of args to filter by.
По умолчанию:array() - $post_type(строка)
- The ACF post type of the posts being filtered.
По умолчанию:'acf-field-group'
Список изменений
| С версии 6.1 | Введена. |
Код acf_filter_internal_post_type_posts() acf filter internal post type posts ACF 6.8.8
function acf_filter_internal_post_type_posts( $posts, $args = array(), $post_type = 'acf-field-group' ) {
$filtered = array();
$instance = acf_get_internal_post_type_instance( $post_type );
if ( $instance ) {
$filtered = $instance->filter_posts( $posts, $args );
}
return $filtered;
}