Call to undefined function get_current_screen()
-
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)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Call to undefined function get_current_screen()’ is closed to new replies.