You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I call intervention('remove-update-notices'); I get an error.
Call to undefined function wp_get_current_user()
This is because the current_user_can() check is to early.
The only prerequisite for current_user_can() is an existing wp_get_current_user(). The latter is defined in pluggable.php, so you can use it after plugins_loaded.
If I call
intervention('remove-update-notices');
I get an error.This is because the
current_user_can()
check is to early.source: http://wordpress.stackexchange.com/questions/198185/what-is-valid-timing-of-using-current-user-can-and-related-functions
The text was updated successfully, but these errors were encountered: