Does a wordpress custom plugin is fired by default on php theme ajax request?

This will never work: add_action( ‘admin_init’, ‘my_ajax_checker’, 10, 2); function my_ajax_checker() { if( wp_doing_ajax() ) { add_action(‘plugins_loaded’, ‘atv_convert_multilingual’); } } This is because by the time admin_init runs, plugins_loaded has already happened! Making this code would would require the code to travel backwards in time. Instead it would be much simpler to do this: add_action(‘plugins_loaded’, … Read more

What is the best way to ignore wordpress administration using add_filter($title) also when Ajax request

There are a couple of things here that should always be kept in-mind when you’re thinking of administrators and WordPress is_admin(). is_admin() tells you only whether or not the current WordPress request has been sent to the WP admin backend. This also, actually, include admin-ajax.php requests. It doesn’t tell you whether or not the current … Read more