Home › Forums › Gutenberg › Mixed variable types in render_callback in acf_register_block_type › Reply To: Mixed variable types in render_callback in acf_register_block_type
This is happening for me as well, it appears to be when using the Gutenberg plugin as opposed to core Gutenberg. Core does not pass a 3rd variable so $is_preview
would expect to default to false in the ACF render callback, but the Gutenberg plugin passes the full block array as a parameter which ACF’s function currently does not expect. I’m currently checking true === $is_preview
to determine if it’s a preview because ACF explicitly sets it to true when this is the case.
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.