From 44f31b9cf6f43058c470f6addbbdffd9e7922eda Mon Sep 17 00:00:00 2001 From: Tetrakern <26898880+Tetrakern@users.noreply.github.com> Date: Sat, 9 Mar 2024 15:20:30 +0100 Subject: [PATCH] Remove Autoptimize JS inject tag Let the plugin handle it. --- footer.php | 2 -- includes/functions/_theme_setup.php | 14 -------------- 2 files changed, 16 deletions(-) diff --git a/footer.php b/footer.php index 00e02ae6..5991ebf2 100644 --- a/footer.php +++ b/footer.php @@ -84,8 +84,6 @@ do_action( 'fictioneer_after_main', $args ); // WordPress footer hook (includes modals) wp_footer(); ?> - - diff --git a/includes/functions/_theme_setup.php b/includes/functions/_theme_setup.php index 80e3e32f..8a58333a 100644 --- a/includes/functions/_theme_setup.php +++ b/includes/functions/_theme_setup.php @@ -1169,20 +1169,6 @@ if ( ! is_admin() && ! get_option( 'fictioneer_enable_jquery_migrate' ) ) { // AUTOPTIMIZE CONFIGURATION // ============================================================================= -/** - * Change JS replace tag for Autoptimize (if installed) - * - * @since 4.0.0 - * @link https://github.com/wp-plugins/autoptimize - * - * @param string $replacetag The original replace tag. - */ - -function fictioneer_replace_ao_insert_position( $replacetag ) { - return array( '', 'replace' ); -} -add_filter( 'autoptimize_filter_js_replacetag', 'fictioneer_replace_ao_insert_position', 10, 1 ); - /** * Exclude stylesheets from Autoptimize (if installed) *