Support

Account

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;
    }