Home › Forums › Bug Reports › acf/load_field alters $post? › Reply To: acf/load_field alters $post?
Little addendum:
If I var_dump the $post variable in pre_populate_teams_dropdown
I get this:
object(WP_Post)[8885]
public 'ID' => int 5084
public 'post_author' => string '1' (length=1)
public 'post_date' => string '2014-02-25 10:23:54' (length=19)
public 'post_date_gmt' => string '0000-00-00 00:00:00' (length=19)
public 'post_content' => string '' (length=0)
public 'post_title' => string '' (length=0)
public 'post_excerpt' => string '' (length=0)
public 'post_status' => string 'auto-draft' (length=10)
public 'comment_status' => string 'open' (length=4)
public 'ping_status' => string 'open' (length=4)
public 'post_password' => string '' (length=0)
public 'post_name' => string '' (length=0)
public 'to_ping' => string '' (length=0)
public 'pinged' => string '' (length=0)
public 'post_modified' => string '2014-02-25 10:23:54' (length=19)
public 'post_modified_gmt' => string '0000-00-00 00:00:00' (length=19)
public 'post_content_filtered' => string '' (length=0)
public 'post_parent' => int 0
public 'guid' => string 'http://loc.apollo8.nl/?post_type=matches&p=5084' (length=47)
public 'menu_order' => int 0
public 'post_type' => string 'matches' (length=7)
public 'post_mime_type' => string '' (length=0)
public 'comment_count' => string '0' (length=1)
public 'filter' => string 'raw' (length=3)
object(WP_Post)[8714]
public 'ID' => int 4438
public 'post_author' => string '1' (length=1)
public 'post_date' => string '2014-02-01 18:01:42' (length=19)
public 'post_date_gmt' => string '2014-02-01 17:01:42' (length=19)
public 'post_content' => string '' (length=0)
public 'post_title' => string 'Heren 1' (length=7)
public 'post_excerpt' => string '' (length=0)
public 'post_status' => string 'publish' (length=7)
public 'comment_status' => string 'open' (length=4)
public 'ping_status' => string 'open' (length=4)
public 'post_password' => string '' (length=0)
public 'post_name' => string 'heren-1' (length=7)
public 'to_ping' => string '' (length=0)
public 'pinged' => string '' (length=0)
public 'post_modified' => string '2014-02-01 18:01:42' (length=19)
public 'post_modified_gmt' => string '2014-02-01 17:01:42' (length=19)
public 'post_content_filtered' => string '' (length=0)
public 'post_parent' => int 0
public 'guid' => string 'http://loc.apollo8.nl/teams/heren-1/' (length=36)
public 'menu_order' => int 0
public 'post_type' => string 'teams' (length=5)
public 'post_mime_type' => string '' (length=0)
public 'comment_count' => string '0' (length=1)
public 'filter' => string 'raw' (length=3)
So the first time it’s ok, but the second round it changes somehow.
And if I disable one of the dropdowns, it also seems to work ok. So this problem only occurs if both dropdowns are being pre_filled.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.