DEV Community

Discussion on: Why is_admin() is totally unsafe for your Wordpress development

Collapse
 
kodikos profile image
Jodi Winters

Nice one, thanks for the clarification, couldn't understand why is_admin() was false all the time for me on a frontend page!
One thing maybe extra to note is that if you're writing a plugin, the functions you suggest using may not even exist until a certain point in the boot sequence. I've found it's safe in the plugins_loaded action.