[wp-hackers] "deprecating" direct calls to wp-config.php

Olivier autremonde75 at gmail.com
Tue Nov 17 16:29:55 UTC 2009


Otto,

Thanks for your prompt answer! I don't really understand your
statment :
"The place where you load wp-config.php can be replaced by putting
your code in an action triggered by wp_ajax_whatever. That's the
difference."
I guess you are talking about some kind of action hook like
add_action('admin_header','my_ajax_function');
Right? Do I place this action hook in the same file as the ajax
function, no matter where is the hook?

How do I link my include ajax function code into the plugin? By
enqueuing the script through an admin_print_scripts callback function?
Or rather by a require_once in the plugin master file?

Sorry if this is obvious for you but it is really not for. I have
tried several things and I am not able to find a solution to remove
the wp-config.php :(

Eric,

Thanks as well for your point. The admin_url is a function that
requires the wp-config.php to be loaded (until I find a solution to
bypass it).

Thanks again!

Olivier


More information about the wp-hackers mailing list