Title: Fatal error get_current_screen
Last modified: August 31, 2016

---

# Fatal error get_current_screen

 *  Resolved [nikitabasenko](https://wordpress.org/support/users/nikitabasenko/)
 * (@nikitabasenko)
 * [10 years ago](https://wordpress.org/support/topic/fatal-error-get_current_screen/)
 * Hi, everyone.
 * So, today accidentally found an error on my WP site.
    I have a few tricks to 
   hide the admin login-page, but before that (i think a few updates of WP) there
   were no problem. If non-admin user was trying to enter to /wp-admin he got 404
   error.
 * Today while trying to check if it’s working i got next error:
 * Fatal error: Call to undefined function get_current_screen() in /www/wp-content/
   plugins/wordpress-seo/inc/wpseo-non-ajax-functions.php on line 467
 * Didn’t find any solutions on web. I mean, i got a few, but didn’t work.
 * So, if anybody has some thoughts – please welcome.
 * thx in advance.

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

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [10 years ago](https://wordpress.org/support/topic/fatal-error-get_current_screen/#post-7388362)
 * Your “wordpress-seo” plugin seems to be the error.
 * Delete this plugin using [FTP ](http://codex.wordpress.org/FTP_Clients), or your
   web-host’s cPanel or whatever file management application your host provides (
   no Dashboard access required).
 *  [girlieworks](https://wordpress.org/support/users/girlieworks/)
 * (@girlieworks)
 * [10 years ago](https://wordpress.org/support/topic/fatal-error-get_current_screen/#post-7388363)
 * Hi, [@nikitabasenko](https://wordpress.org/support/users/nikitabasenko/). The
   WordPress function `get_current_screen` is defined in its `/wp-admin/includes/
   screen.php` file — so I suggest accessing the files on your server via FTP, and
   verifying that that particular file does indeed exist there (if not, you’ll want
   to upload it again).
 *  Thread Starter [nikitabasenko](https://wordpress.org/support/users/nikitabasenko/)
 * (@nikitabasenko)
 * [10 years ago](https://wordpress.org/support/topic/fatal-error-get_current_screen/#post-7388443)
 * Tara
 * > Your “wordpress-seo” plugin seems to be the error
 * I don’t have such plugin 🙂
 * girlieworks –
 * > and verifying that that particular file does indeed exist there
 * The thing is, that there were not error before. It’s maybe after a few last updates
   of WP during a month. Cause i only added content, not any kind of plugins etc.
 *  Thread Starter [nikitabasenko](https://wordpress.org/support/users/nikitabasenko/)
 * (@nikitabasenko)
 * [10 years ago](https://wordpress.org/support/topic/fatal-error-get_current_screen/#post-7388444)
 * Ok, anyway i found the desicion here – [support topic link](https://wordpress.org/support/topic/fatal-error-call-to-undefined-function-85?replies=8)
 * So, the key is.
    On line 466 in file /wp-content/plugins/wordpress-seo/inc/wpseo-
   non-ajax-functions.php right before
 * $screen = get_current_screen();
 * i’ve added next line:
 * require_once(ABSPATH . ‘wp-admin/includes/screen.php’);
 * And the error have gone.
 *  [harimay](https://wordpress.org/support/users/harimay/)
 * (@harimay)
 * [10 years ago](https://wordpress.org/support/topic/fatal-error-get_current_screen/#post-7388445)
 * I think you Problem will get Solved
 * Simple add this line in themes functions.php file
 *     ```
       add_action( 'init', 'Harimay_init_callback', 10001 );
       function Harimay_init_callback(){
       	if( ! function_exists( get_current_screen ) ){
       		function get_current_screen() {
       			global $current_screen;
   
       			if ( ! isset( $current_screen ) )
       				return null;
   
       			return $current_screen;
       		}
       	}
       }
       ```
   
 * This is not an perfect way but can solved you problem
 *  Thread Starter [nikitabasenko](https://wordpress.org/support/users/nikitabasenko/)
 * (@nikitabasenko)
 * [10 years ago](https://wordpress.org/support/topic/fatal-error-get_current_screen/#post-7388460)
 * [@harimay](https://wordpress.org/support/users/harimay/), what do you about my
   desicion? – is it so bad?
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [10 years ago](https://wordpress.org/support/topic/fatal-error-get_current_screen/#post-7388465)
 * [@nikitabasenko](https://wordpress.org/support/users/nikitabasenko/),
 * Glad to know you got it sorted 🙂
 * You may also want to bring this issue to the attention of the author of /wp-content/
   plugins/wordpress-seo/ so that they can take appropriate action.
 * Where did you download it from?
 *  Thread Starter [nikitabasenko](https://wordpress.org/support/users/nikitabasenko/)
 * (@nikitabasenko)
 * [10 years ago](https://wordpress.org/support/topic/fatal-error-get_current_screen/#post-7388467)
 * > Where did you download it from?
 * It’s yoast SEO plugin. Got it from WP-plugins (as ussial – admin console installation).
 * Sent them a letter.
 *  [suge1w](https://wordpress.org/support/users/suge1w/)
 * (@suge1w)
 * [10 years ago](https://wordpress.org/support/topic/fatal-error-get_current_screen/#post-7388539)
 * I can confirm that adding `require_once(ABSPATH . 'wp-admin/includes/screen.php');`
   does fix the issue.
 *  [kmessinger](https://wordpress.org/support/users/kmessinger/)
 * (@kmessinger)
 * [10 years ago](https://wordpress.org/support/topic/fatal-error-get_current_screen/#post-7388540)
 * **[@harimay](https://wordpress.org/support/users/harimay/)** The solution as 
   posted is correct and involves the plugin author. You solution is not correct
   as it will be overwritten the next time the theme is updated.
 *  [harimay](https://wordpress.org/support/users/harimay/)
 * (@harimay)
 * [10 years ago](https://wordpress.org/support/topic/fatal-error-get_current_screen/#post-7388542)
 * Both are correct because in my code
    I am checking is function exists or not
 * If it exists then my code will not going to run
 * So there can’t be any clash or fatal error with the WP or any other plugin
 *  [kmessinger](https://wordpress.org/support/users/kmessinger/)
 * (@kmessinger)
 * [10 years ago](https://wordpress.org/support/topic/fatal-error-get_current_screen/#post-7388547)
 * [@harimay](https://wordpress.org/support/users/harimay/). Did you read and understand
   what I wrote about being overwritten?
 *  [harimay](https://wordpress.org/support/users/harimay/)
 * (@harimay)
 * [10 years ago](https://wordpress.org/support/topic/fatal-error-get_current_screen/#post-7388548)
 * Yup
    Sorry I did not ready that propely

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

The topic ‘Fatal error get_current_screen’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 6 participants
 * Last reply from: [harimay](https://wordpress.org/support/users/harimay/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/fatal-error-get_current_screen/#post-7388548)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
