Support

Account

Home Forums Bug Reports Bug ACF 5.2.0 – Custom Fields stop rendering Reply To: Bug ACF 5.2.0 – Custom Fields stop rendering

  • Hi @jgraup

    Yes, the function contains a loop which would run when the posts__in arg is supplied (this is used by ACF):

    
    // array of post ids
    137	                // post_parent__in & post_parent__not_in since WP 3.6
    138	                foreach (array('post__in', 'post__not_in', 'post_parent__in', 'post_parent__not_in') as $key) {
    139	                        $arr = array();
    140	                        if (!empty($qv[$key])) {
    141	                                // post__in used by the 2 functions below
    142	                                // useless to filter them as output is already in the right language and would result in performance loss
    143	                                foreach (debug_backtrace() as $trace)
    144	                                        if (in_array($trace['function'], array('wp_nav_menu', 'gallery_shortcode')))
    145	                                                return;
    146	
    147	                                foreach ($qv[$key] as $p)
    148	                                        $arr[] = ($tr = pll_get_post($p)) ? $tr : $p;
    149	
    150	                                $qv[$key] = $arr;
    151	                        }
    152	                }
    

    I’m not sure what the code does exactly, but it looks to modify the id’s.

    I would advise that you debug this function by printing out the $qv varible before and after this loop. This will show what has changed:

    Thanks
    E