Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Class 'WP_Screen' not found in wp-content/plugins/wp2grav/wp2grav.php on line 68 #4

Open
davidak opened this issue Feb 23, 2016 · 3 comments

Comments

@davidak
Copy link

davidak commented Feb 23, 2016

on export

@robsonsobral
Copy link

Same thing here.

@robsonsobral
Copy link

On wp2grav.php, line 67, this:

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

should be:

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

I don't know exactly when, but it looks like WordPress changed at some version..

@cord
Copy link
Contributor

cord commented Mar 22, 2016

thanks for finding this, please make a PR with the code changes.

for compatibility I would do something like

if (file_exists(ABSPATH . '/wp-admin/includes/class-wp-screen.php')) {
   require_once(ABSPATH . '/wp-admin/includes/class-wp-screen.php');
} else {
   require_once(ABSPATH . 'wp-admin/includes/screen.php');
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants