[wp-hackers] find wp-config from a plugin file

Jess Planck jesse.planck at gmail.com
Wed Jan 30 18:52:58 GMT 2008

I believe you could also use the template_redirect action using some  
sort of unique request token. Then exit the function once your ajax  
job is complete. This basically stops WordPress cold before it  
includes template files. This probably would start some headers  
though. something like:

function do_my_bidding() {
	// Kill intruders
	if ( !defined('ABSPATH') ) exit();
	echo 'You are the boss!!'

if ( $_REQUEST['do_my_bidding_token'] == 'yes-master' ) {
	add_action('template_redirect', 'do_my_bidding');

Then the request should look like:


I don't know if this is what you are looking for, but I found it very  
useful for overly complex ajax functions that need a large set of  
built-in WordPress functions.


On Jan 30, 2008, at 11:15 AM, Otto wrote:

> Including wp-blog-header.php does not produce any output at all unless
> you have WP_USE_THEMES defined to be true.

More information about the wp-hackers mailing list