This file contains hidden or 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
function dtrm_add_article_microdata() { | |
if ( 'post' !== get_post_type() && ! is_singular() ) { | |
return; | |
} | |
$current_post_id = get_queried_object_id(); | |
?> | |
<script type=application/ld+json> | |
{ | |
"@context" : "http://schema.org", |
This file contains hidden or 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
// document ready function | |
let ready = callback => { | |
if (document.readyState !== "loading") { | |
callback(); | |
} else { | |
document.addEventListener("DOMContentLoaded", callback); | |
} | |
} | |
async function postData(url = '', data = {}) { |
This file contains hidden or 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 | |
function remove_noscript_from_footer_autoptimize( $html ) { | |
return preg_replace('~<noscript>(.*)</noscript>~', '', $html); | |
} | |
add_filter('autoptimize_filter_imgopt_lazyload_cssoutput', 'remove_noscript_from_footer_autoptimize'); |