Basic plug-in question – when myplugin.php runs
-
Sorry for a silly question – but I am defeated.
If I have a simple plugin myplugin.php, WordPress will run this file at some point, and will wp_enqueue_script and add_action etc.
But when exactly does it run? Does it run every time WordPress wishes to load a new page? Is this before header/ body is rendered? If so, will $GLOBALS[‘post’]->post_name; be reliably set at this point?
Is it run at any other time ever? (yes I know that functions within it are called by the framework).
Thanks – I really can’t find an answer to this basic issue anywhere else!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Basic plug-in question – when myplugin.php runs’ is closed to new replies.