• Resolved nprior

    (@nprior)


    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)
  • 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

    Solution:

    require_once(ABSPATH . 'wp-admin/includes/screen.php');

    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

    (@nprior)

    @shahjahanakber
    Thank you!

    I added that line to the functions.php in the child theme – job done.

    in the functions.php.. anywhere in that php document? Or? ??

    We really need some help

    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

    Hello @nprior, @slipkot, @shahjahanakber, @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.