This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Persist Admin notices Dismissal | |
* | |
* Copyright (C) 2016 Collins Agbonghama <http://w3guy.com> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html class="no-js" lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" > | |
<link rel="profile" href="https://gmpg.org/xfn/11"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('autoptimize_filter_css_preload_onload','__return_empty_string'); | |
add_filter('autoptimize_css_preload_polyfill','defer_iso_preload'); | |
add_filter('autoptimize_html_after_minify','preload_to_aodeferload'); | |
add_filter('autoptimize_filter_css_replacetag','inject_css_in_footer'); | |
function defer_iso_preload() { | |
return '<script data-cfasync="false">!function(n){"use strict";n.loadCSS||(n.loadCSS=function(){});var o=loadCSS.relpreload={};o.bindMediaToggle=function(e){var t=e.media||"all";function a(){e.addEventListener?e.removeEventListener("load",a):e.attachEvent&&e.detachEvent("onload",a),e.setAttribute("onload",null),e.media=t}e.addEventListener?e.addEventListener("load",a):e.attachEvent&&e.attachEvent("onload",a),setTimeout(function(){e.rel="stylesheet",e.media="only x"}),setTimeout(a,3e3)},o.poly=function(){for(var e=n.document.getElementsByTagName("link"),t=0;t<e.length;t++){var a=e[t];"aodeferload"!==a.rel||"style"!==a.getAttribute("as")||a.getAttribute("data-loadcss")||(a.setAttribute("dat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('plugins_loaded','ao_defer_inline_init'); | |
function ao_defer_inline_init() { | |
if ( get_option('autoptimize_js_include_inline') != 'on' ) { | |
add_filter('autoptimize_html_after_minify','ao_defer_inline_jquery',10,1); | |
} | |
} | |
function ao_defer_inline_jquery( $in ) { |