• Resolved Sander

    (@sander-falise)


    Found a bug:

    PHP Fatal error: Uncaught Error: Call to undefined function get_current_screen() in …/wp-content/plugins/molongui-authorship/includes/hooks/post/query.php:6

    Fixed it like so:

    $current_screen_id = 0;
    if ( function_exists( 'get_current_screen' ) )
    {
      $current_screen = get_current_screen();
      $current_screen_id = $current_screen->id;
    }
    

    Then used $current_screen_id instead of $current_screen->id in the rest of the code.

    Hope this helps.

    Regards, Sander.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Molongui

    (@molongui)

    Hi @sander-falise ,

    Thanks for sharing. And sorry about that! We have released a new update (4.6.15) with a fix to that issue. In order to update:

    • Go to: Dashboard > Updates > Check again
    • When the 4.6.15 update is shown, update the plugin
    • Flush any cache you may have
    • That should be it

    Thanks again!

    Thread Starter Sander

    (@sander-falise)

    Thanks for the quick fix, I can confirm it works now. The error appeared when logged in as admin and viewing the frontend of the website, now it’s gone. Great work!

    Plugin Author Molongui

    (@molongui)

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Call to undefined function get_current_screen()’ is closed to new replies.