acf/decode_post_id filter-hookACF 5.7.11

Filters the decoded post_id information.

Usage

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(array)
An array containing "type" and "id" information.
$post_id(int|string)
The post id.

Changelog

Since 5.7.11 Introduced.

Where the hook is called

acf_decode_post_id()
acf/decode_post_id
acf/includes/acf-wp-functions.php 234
return apply_filters( 'acf/decode_post_id', compact( 'type', 'id' ), $post_id );

Where the hook is used in Advanced Custom Fields PRO

acf/src/Pro/Meta/WooOrder.php 35
add_filter( 'acf/decode_post_id', array( $this, 'decode_woo_order_id' ), 10, 2 );