acf/load_(hook_name_plural)
Filters the posts array.
Использование
add_filter( 'acf/load_(hook_name_plural)', 'wp_kama_acf_load_hook_name_plural_filter', 10, 2 );
/**
* Function for `acf/load_(hook_name_plural)` filter-hook.
*
* @param array $posts The array of ACF posts.
* @param $post_type
*
* @return array
*/
function wp_kama_acf_load_hook_name_plural_filter( $posts, $post_type ){
// filter...
return $posts;
}
- $posts(массив)
- The array of ACF posts.
- $post_type
- -
Список изменений
| С версии 5.0.0 | Введена. |
Где вызывается хук
acf/load_(hook_name_plural)
acf/includes/class-acf-internal-post-type.php 381
$posts = apply_filters( "acf/load_{$this->hook_name_plural}", $posts, $this->post_type );
Где используется хук в Advanced Custom Fields PRO
acf/includes/local-fields.php 661
add_filter( 'acf/load_field_groups', '_acf_apply_get_local_internal_posts', 20, 2 );
acf/includes/local-fields.php 662
add_filter( 'acf/load_post_types', '_acf_apply_get_local_internal_posts', 20, 2 );
acf/includes/local-fields.php 663
add_filter( 'acf/load_taxonomies', '_acf_apply_get_local_internal_posts', 20, 2 );
acf/includes/local-fields.php 664
add_filter( 'acf/load_ui_options_pages', '_acf_apply_get_local_internal_posts', 20, 2 );