Home › Forums › Bug Reports › undefined function get_current_screen() › Reply To: undefined function get_current_screen()
Hi all,
This bug has been patched, and the ACF PRO plugin files have been re-uploaded online.
Please manually path this fix by editing the file “includes/api/api-helpers.php” and change the acf_is_block_editor()
function on line ~5051 to:
/**
* acf_is_block_editor
*
* Returns true if the current screen uses the block editor.
*
* @date 13/12/18
* @since 5.8.0
*
* @param void
* @return bool
*/
function acf_is_block_editor() {
if( function_exists('get_current_screen') ) {
$screen = get_current_screen();
if( method_exists($screen, 'is_block_editor') ) {
return $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.