There's still some inconsistency. Tutorial says: "Note: In WP 2.8, if
a user is not logged in ('wp_ajax_nopriv_my_action'), then GET
requests are ignored (and return -1). This bug was fixed in WP 2.9."
It probably means that for every wordpress with version less then 2.9
wp_ajax_nopriv_my_action hook doesn't work, right for not logged in
users? And then it goes again - next section: "Ajax on the
Viewer-Facing Side ( WordPress 2.6 , 2.7, 2.8 )" and:
"add_action('wp_ajax_nopriv_my_special_action',
'my_action_callback');". At the same time Codex says that: "We need to
send our request to a plugin PHP file. This should be the main plugin
PHP file. In case you want it to be a separate PHP file, bare in mind
that you won't be able to access the Wordpress global variables, e.g.
$wpdb, since separate files have absolutely no visibility to any part
of WordPress at all."
I think having all that together, no new comer will be able to figure
out howto write an ajax call for not logged-in users for WP version
less then 2.9 (current stable release that is).
On Tue, Nov 17, 2009 at 8:40 PM, nunomorgadinho
<
nuno.morgadinho@...> wrote:
--
Davit Barbakadze
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers