Remove Autoptimize JS inject tag

Let the plugin handle it.
This commit is contained in:
Tetrakern 2024-03-09 15:20:30 +01:00
parent e4de35c3de
commit 44f31b9cf6
2 changed files with 0 additions and 16 deletions

View File

@ -84,8 +84,6 @@ do_action( 'fictioneer_after_main', $args );
// WordPress footer hook (includes modals) // WordPress footer hook (includes modals)
wp_footer(); wp_footer();
?> ?>
<injectjs /> <!-- Autoptimize insert position -->
</body> </body>
</html> </html>

View File

@ -1169,20 +1169,6 @@ if ( ! is_admin() && ! get_option( 'fictioneer_enable_jquery_migrate' ) ) {
// AUTOPTIMIZE CONFIGURATION // 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( '<injectjs />', 'replace' );
}
add_filter( 'autoptimize_filter_js_replacetag', 'fictioneer_replace_ao_insert_position', 10, 1 );
/** /**
* Exclude stylesheets from Autoptimize (if installed) * Exclude stylesheets from Autoptimize (if installed)
* *