The earliest hook I know of is init
. My recommendation would be to build this as a plug-in (so that it will survive upgrades) and do the following:
add_action('init', 'load_curl_functions');
function load_curl_functions() {
//Use dl() to load curl
}
---- EDIT ----
It looks like there are some hooks that fire before init
. I recommend trying to hook to load_textdomain
instead. This is the hook that loads language and translation functions (the only hook that fires earlier is muplugins_loaded
which might not work in non-mu installations).
So: add_action('load_textdomain', 'load_curl_functions');
should load your curl extension before doing anything else ...