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

Olivier autremonde75 at gmail.com
Tue Nov 17 16:44:26 UTC 2009


Hi Otto,

Yes I have read the Codex.

I think I haven't explained clearly enough where my problem was, sorry
for that.

The issue isn't with the Ajax callback. I am able to have this working
properly without any problem.

The issue is with the javascript/jQuery code (client side). If I
remove the call the wp-config.php, then when the JS code is generated
and added into the html file sent to the client, this php part won't
be resolved : <?php echo admin_url("admin-ajax.php"); ?> potentially
because admin_url is a function known through the core...

That's it, no issue with the server side ajax handling, I don't have
anything to change on that front as I am already using the admin-ajax
hooking style. The issue is really with the client side and providing
the right URL to call which I can't if I don't have a way to get the
admin_url resolved.

Sorry for the confusion...

Olivier


More information about the wp-hackers mailing list