• There are some cases where fields are loaded before the file wp-admin/includes/screen.php is included and this causes Fatal error: Call to undefined function get_current_screen() in …/wp-content/plugins/acf-enhanced-message-field/acf-enhanced-message-v5.php on line 104.

    This happens when a call to an internal acf function get_acf_field_groups() is used. The problem comes up in specific other plugins and in theme where fields are modified during on acf/include_fields.

    I’d like to request that you change line 131 of acf-enhanced-message-v4.php and line 100 of acf-enhanced-message-v5.php from

    
    if ( ! is_admin() ) {
    

    to

    
    if ( ! is_admin() || !function_exists('get_current_screen') ) {
    

    Thanks,
    ~JH

  • The topic ‘Call to undefined function get_current_screen()’ is closed to new replies.