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
function disable_fetchpriority_high( $loading_attrs ) { | |
unset( $loading_attrs['fetchpriority'] ); | |
return $loading_attrs; | |
} | |
add_filter( | |
'wp_get_loading_optimization_attributes', | |
'disable_fetchpriority_high' | |
); |
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
/* Remove Query Strings | |
/***********************************************************************/ | |
add_action('init', 'remove_query_strings'); | |
function remove_query_strings() { | |
if(!is_admin()) { | |
add_filter('script_loader_src', 'remove_query_strings_split', 15); | |
add_filter('style_loader_src', 'remove_query_strings_split', 15); | |
} | |
} | |
function remove_query_strings_split($src) { |
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
<script type="text/javascript"> | |
var elm=document.getElementsByTagName("html")[0]; | |
elm.style.display="none"; | |
document.addEventListener("DOMContentLoaded",function(event) {elm.style.display="block"; }); | |
</script> |
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( 'shutdown', function() { | |
// If the event is scheduled, don't run anything. | |
if ( wp_next_scheduled( 'prefix_remove_license_activation_logs' ) ) { | |
return; | |
} | |
if ( ! function_exists( 'edd_has_upgrade_completed' ) ) { |
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
/* preview-mode paragraphs */ | |
p{ | |
padding-top: 6px; | |
padding-bottom: 6px; | |
line-height: 1.6; | |
} | |
/* preview-mode lists */ | |
li{ | |
padding-top: 6px; |
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
function na_remove_slug( $post_link, $post, $leavename ) { | |
if ( 'artist' != $post->post_type || 'publish' != $post->post_status ) { | |
return $post_link; | |
} | |
$post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link ); | |
return $post_link; | |
} |
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
<script> | |
if (window.innerwidth < 900) { | |
document.write('<script type="text/javascript" src="https://domain.com/wp-content/plugins/perfmatters/vendor/fastclick/fastclick.min.js"><\/script>'); | |
} | |
</script> | |
<script> | |
if(window.innerWidth < 900) { | |
if('addEventListener' in document) { | |
document.addEventListener('DOMContentLoaded', function() { |
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
html {-webkit-font-smoothing: auto;} | |
/*fonts*/ | |
strong {color:#202020;} | |
/*no margin mobile*/ | |
@media screen and (max-width: 768px) { | |
.no-margin-mobile {margin-bottom:0px;}} | |
/*links*/ | |
#block-2 a {text-decoration:none;} | |
#block-2 {border: 1px solid rgba(0,0,0,.05); | |
box-shadow: 0 0 27px 0 rgb(214 231 233 / 52%); |
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
.nameofdiv { | |
content-visibility: auto; | |
contain-intrinsic-size: 0 1000px; | |
} | |
/* References: | |
https://web.dev/content-visibility/ | |
https://segmentfault.com/a/1190000041980427/en | |
https://clubmate.fi/content-visibility-auto | |
https://dev.to/dailydevtips1/i-made-my-website-28ms-faster-with-content-visibility-466e |
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
add_filter( 'generate_post_date_output', function( $output, $time_string ) { | |
$time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">Published on %2$s</time>'; | |
if ( get_the_date() !== get_the_modified_date() ) { | |
$time_string = '<time class="entry-date updated-date" datetime="%3$s" itemprop="dateModified">Updated on %4$s</time>'; | |
} | |
$time_string = sprintf( $time_string, | |
esc_attr( get_the_date( 'c' ) ), | |
esc_html( get_the_date() ), |
NewerOlder