Skip to content

Conversation

@zackkatz
Copy link
Contributor

@zackkatz zackkatz commented Apr 19, 2022

Check whether global $pagenow has a value before relying on it. Since the hook is called using admin_init, I'm not sure exactly how the user has reached this code, but it's possible it could be called manually or via AJAX.

It's not a problem to check for it and to use the alternative code suggested by @shivchawla

Resolves #24

Check whether global `$pagenow` has a value before relying on it. Since the hook is called using `admin_init`, I'm not sure exactly how the user has reached this code, but it's possible it could be called manually or via AJAX.

It's not a problem to check for it and to use the alternative code suggested by @shivchawla

Co-Authored-By: shivchawla <[email protected]>
@zackkatz zackkatz changed the base branch from develop to main April 19, 2022 02:52
@zackkatz zackkatz merged commit f5495b5 into main Apr 19, 2022
@zackkatz zackkatz deleted the issue/24-pagenow branch April 19, 2022 02:53
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

Successfully merging this pull request may close these issues.

Check for profile page looks incorrect/incomplete

2 participants