Title: Call to undefined function get_current_screen
Last modified: July 24, 2017

---

# Call to undefined function get_current_screen

 *  Resolved [nprior](https://wordpress.org/support/users/nprior/)
 * (@nprior)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/call-to-undefined-function-get_current_screen-5/)
 * I’m using Events Manger plugin plus WP Smushit. EM allows a user to load an image
   from the front end. When I try doing that I get the following error:
 * Call to undefined function get_current_screen() in /home/crossing/public_html/
   wordpress/wp-content/plugins/wp-smushit/lib/class-wp-smush-resize.php
 * Presumably some incompatibility possibly due to page not being an admin page.
   Can you give me any pointers to get round this?
    thanks Nick

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Andreas](https://wordpress.org/support/users/slipkot/)
 * (@slipkot)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/call-to-undefined-function-get_current_screen-5/#post-9346521)
 * Same issue here. Log message bellow:
 * [21-Jul-2017 16:25:53 UTC] PHP Fatal error: Call to undefined function get_current_screen()
   in …../plugins/wp-smushit/lib/class-wp-smush-resize.php on line 56
 *  [shahjahanakber](https://wordpress.org/support/users/shahjahanakber/)
 * (@shahjahanakber)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/call-to-undefined-function-get_current_screen-5/#post-9349016)
 * **Solution:**
 * `require_once(ABSPATH . 'wp-admin/includes/screen.php');`
 *  [aresteff](https://wordpress.org/support/users/aresteff/)
 * (@aresteff)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/call-to-undefined-function-get_current_screen-5/#post-9349893)
 * We’re also using WP Smush.
 * We’re getting this error:
 * Fatal error: Call to undefined function get_current_screen() in /home1/rubenb/
   public_html/restaurantbelgie.be/wp-content/plugins/wp-smushit/lib/class-wp-smush-
   resize.php on line 56
 * line 56 says: $current_screen = get_current_screen();
 * I’m totally not experienced with php etc..
 * How do I solve this problem?
 * We get this error when entering a new listing on a Listable theme listing site,
   when we add a photo to the listing.
 *  Thread Starter [nprior](https://wordpress.org/support/users/nprior/)
 * (@nprior)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/call-to-undefined-function-get_current_screen-5/#post-9350118)
 * [@shahjahanakber](https://wordpress.org/support/users/shahjahanakber/)
    Thank
   you!
 * I added that line to the functions.php in the child theme – job done.
 *  [aresteff](https://wordpress.org/support/users/aresteff/)
 * (@aresteff)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/call-to-undefined-function-get_current_screen-5/#post-9350319)
 * in the functions.php.. anywhere in that php document? Or? 😀
 * We really need some help
 *  [Umesh Kumar](https://wordpress.org/support/users/umeshsingla/)
 * (@umeshsingla)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/call-to-undefined-function-get_current_screen-5/#post-9365408)
 * Hey Guys,
 * So sorry for the delay in here, I’m looking into it.
 * AFAIK it’s a conflict with some plugin, Hope to have a fix real soon.
 * Thanks, Umesh
 *  [Umesh Kumar](https://wordpress.org/support/users/umeshsingla/)
 * (@umeshsingla)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/call-to-undefined-function-get_current_screen-5/#post-9376557)
 * Hello [@nprior](https://wordpress.org/support/users/nprior/), [@slipkot](https://wordpress.org/support/users/slipkot/),
   [@shahjahanakber](https://wordpress.org/support/users/shahjahanakber/), [@aresteff](https://wordpress.org/support/users/aresteff/)
 * This should be fixed with Smush 2.7.4.1
 * Thanks, Umesh

Viewing 7 replies - 1 through 7 (of 7 total)

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

 * ![](https://ps.w.org/wp-smushit/assets/icon-256x256.gif?rev=3447113)
 * [Smush – Image Optimization, Compression, Lazy Load, WebP & CDN](https://wordpress.org/plugins/wp-smushit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-smushit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-smushit/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-smushit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-smushit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-smushit/reviews/)

## Tags

 * [frontend](https://wordpress.org/support/topic-tag/frontend/)

 * 7 replies
 * 5 participants
 * Last reply from: [Umesh Kumar](https://wordpress.org/support/users/umeshsingla/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/call-to-undefined-function-get_current_screen-5/#post-9376557)
 * Status: resolved