PDA

View Full Version : [SOLVED]quick (hopefully easy) question


Dr.CustUmz
04-16-2016, 02:40 PM
if i make a plugin at global start execution 1

and another at global complete execution 999

would that be the absolute first and last things triggered or do i need to use a different hook?

Dave
04-16-2016, 03:03 PM
I took a quick look at the code, but it seems that init_startup is the first hook that's called and the last hook called is global_complete. (If print_output is called)

Any script first includes global.php, which then includes /includes/init.php which contains the call to init_startup, after the database connection.

Dr.CustUmz
04-16-2016, 04:23 PM
Thanks Dave,

So would it be best to place
$PagLoadStartTime = microtime(TRUE);
in init_startup, then in global complete
$PagLoadStopTime = microtime(TRUE);

to get the most accurate page load time

Dave
04-16-2016, 04:40 PM
Yes, although ideally it's placed on top of global.php, but that way it's hardcoded so init_startup would be your best option.

Dr.CustUmz
04-16-2016, 04:46 PM
thanks again, anything further would be off this topic so Ill make a new thread if needed =) appreciate it!