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.
if ( ! is_admin() )
add_action( 'after_setup_theme', array( 'wpseAjaxClass', 'init' ), 10 );
The answer was as stupid as simple: I wrapped the init
for the class in a ! is_admin()
call. This successfully prevented the callback from beeing fired.
! is_admin()
call.define( 'WP_ADMIN', true );