[wp-hackers] ajax to call function in theme

Dylan Kuhn dylankkuhn at gmail.com
Fri Dec 25 04:58:16 UTC 2009

> The canonical redirection code is probably at play here.

Thanks for the hint - I think you are probably right, and that I had a
bug in my POST request. When I tried to reproduce the problem,
thinking I would spit out some useful debugging information from
redirect_canonical(), it worked.  But I was happy to see this code
there, which should let any POST request with data through:

function redirect_canonical($requested_url=null, $do_redirect=true) {
	global $wp_rewrite, $is_IIS, $wp_query, $wpdb;

	if ( is_trackback() || is_search() || is_comments_popup() ||
is_admin() || $is_IIS || ( isset($_POST) && count($_POST) ) ||
is_preview() || is_robots() )


More information about the wp-hackers mailing list