Add is_admin check
-
Hi, a lot of files are loaded on every page load. Especially upgrade.php should not have to be loaded when not in the WordPress admin.
Unfortunately this has resulted in a conflict with another plugin that assumes that
get_current_screen()
is only available in the admin. Which is true if upgrade.php would not have been required manually in your plugin. I am creating a ticket there for stricter checks but it still stands that there does not seem to be a good reason to load upgrade.php anywhere else than in the admin.Is there anywhere I could create a pull request? I have found https://github.com/sendinblue/wordpress-contacts-plugin but this doesn’t seem to get any updates.
A simple check foris_admin()
in sendinblue.php would already help a lot.if ( self::is_api_key_set() && is_admin() ) { // ... }
- The topic ‘Add is_admin check’ is closed to new replies.