I'm currently developing a plugin that uses ajax functionality.
Problem: The callback isn't fired = no data gets processed.
if ( ! is_admin() )
add_action( 'after_setup_theme', array( 'wpseAjaxClass', 'init' ), 10 );
|
I'm currently developing a plugin that uses ajax functionality. Problem: The callback isn't fired = no data gets processed.
|
||||
| show 6 more comments |
|
The answer was as stupid as simple: I wrapped the Rule for AJAX loading
The 2nd line from admin-ajax.php
|
|||||||
|
is_single(). It was called when the page was being viewed, but not when the AJAX request was made. I see that one of your comments says the code is part of the class. Any chance you can show the rest of the class? – tollmanz Feb 6 '12 at 5:17my_action_cb()fn itself isn't hidden behind something. Just sits right in the middle of the class. As shown in the, the enqueue happens right in the__construct()of the class. I added a screenshot from the console. Please see Edit. Any other ideas? – kaiser Feb 6 '12 at 5:44