Not being viewed from an Admin Page
-
Pretty new to plugin development… But as I’ve been going along it seems that the WHOLE plugin file is being loaded when on frontend pages and I’ve always wondered why pages that don’t even use many plugins and you have a whole load installed always seem to load slowly even so… So I’ve come to the conclusion its this… The whole plugin code is being loaded for frontend pages even if none of its being used.
So surely there is some kind of simple function like is_admin_page() or something you can use in the plugin ie:
if(!is_admin_page){ exit(); }
before all the admin functions and plugin stuff start operating which would surely save a whole heap of resources… But maybe I’ve overlooked something. I know you can limit it by user level, but really it would make more sense to limit it if people are on an admin page or not.
- The topic ‘Not being viewed from an Admin Page’ is closed to new replies.