acf/pre_load_post_id
allow filter to short-circuit load_value logic
Використання
add_filter( 'acf/pre_load_post_id', 'wp_kama_acf_pre_load_post_id_filter', 10, 2); /** * Function for `acf/pre_load_post_id` filter-hook. * * @param $null * @param $post_id * * @return */ function wp_kama_acf_pre_load_post_id_filter( $null, $post_id ){ // Filter... return $null; }
- $null
- –
- $post_id
- –
Де викликається хук
acf/pre_load_post_id
acf/includes/api/api-helpers.php 2485
$preload = apply_filters( 'acf/pre_load_post_id', null, $post_id );
Де використовується хук в Advanced Custom Fields
acf/includes/local-meta.php 31
add_filter( 'acf/pre_load_post_id', array( $this, 'pre_load_post_id' ), 1, 2 );