Title: Call to undefined function get_current_screen()
Last modified: November 1, 2016

---

# Call to undefined function get_current_screen()

 *  [John Huebner](https://wordpress.org/support/users/hube2/)
 * (@hube2)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/call-to-undefined-function-get_current_screen-3/)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/acf-enhanced-message-field.svg)
 * [ACF Enhanced Message Field](https://wordpress.org/plugins/acf-enhanced-message-field/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/acf-enhanced-message-field/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/acf-enhanced-message-field/)
 * [Active Topics](https://wordpress.org/support/plugin/acf-enhanced-message-field/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/acf-enhanced-message-field/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/acf-enhanced-message-field/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [John Huebner](https://wordpress.org/support/users/hube2/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/call-to-undefined-function-get_current_screen-3/)
 * Status: not resolved