Home › Forums › Bug Reports › undefined function get_current_screen() › Reply To: undefined function get_current_screen()
A form of this bug has resurfaced in yesterday’s 5.8.1 release.
The new acf_is_block_editor function in api-helper.php should presumably also check if get_current_screen exists at the start (line 5051)
I fixed it with the following code:
function acf_is_block_editor() {
if( function_exists('get_current_screen') && method_exists(get_current_screen(), 'is_block_editor') ) {
return get_current_screen()->is_block_editor();
}
return false;
}
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.