From e70c3f1e72223b4d925e1cdfb977ba2296bd11c1 Mon Sep 17 00:00:00 2001 From: Dac Chartrand Date: Mon, 9 Apr 2018 17:42:05 -0400 Subject: [PATCH] No intervention when doing AJAX (#121) --- functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index bb8c04f..643187a 100644 --- a/functions.php +++ b/functions.php @@ -36,7 +36,9 @@ $includes = [ foreach ( $includes as $include ) { require get_template_directory() . "/inc/$include/namespace.php"; } -require get_template_directory() . '/inc/intervention.php'; +if ( ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { + require get_template_directory() . '/inc/intervention.php'; +} add_action( 'after_switch_theme', '\Aldine\Activation\create_default_content', 10 ); add_action( 'after_switch_theme', '\Aldine\Activation\create_menus', 11 );