acf/decode_post_id
Filters the decoded post_id information.
Использование
add_filter( 'acf/decode_post_id', 'wp_kama_acf_decode_post_id_filter', 10, 2 ); /** * Function for `acf/decode_post_id` filter-hook. * * @param array $props An array containing "type" and "id" information. * @param int|string $post_id The post id. * * @return array */ function wp_kama_acf_decode_post_id_filter( $props, $post_id ){ // filter... return $props; }
- $props(массив)
- An array containing "type" and "id" information.
- $post_id(int|строка)
- The post id.
Список изменений
С версии 5.7.11 | Введена. |
Где вызывается хук
acf/decode_post_id
acf/includes/acf-wp-functions.php 218
return apply_filters( 'acf/decode_post_id', compact( 'type', 'id' ), $post_id );