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
<!-- Source: https://litmus.com/community/snippets/233-dark-mode-support --> | |
<!-- Put both of these sections in the <head> of your email. --> | |
<!-- Enable Dark Mode Support --> | |
<meta name="color-scheme" content="light dark"> | |
<meta name="supported-color-schemes" content="light dark only"> | |
<style type="text/css"> | |
:root { | |
color-scheme: light dark; |
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 to defer or asynchronously load scripts*/ | |
function js_async_attr($tag){ | |
# Do not add defer or async attribute to these scripts | |
$scripts_to_exclude = array('jquery.js', 'script2.js', 'script3.js'); | |
foreach($scripts_to_exclude as $exclude_script){ | |
if(true == strpos($tag, $exclude_script ) ) | |
return $tag; | |
} |
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
<!-- Parse email address from URL parameter = email --> | |
<script> | |
var mail = document.querySelector('input#email_address'); | |
if (mail) { | |
var t = document.location.href.split('?')[1]; | |
if (t) { | |
var params = {}; | |
var lst = t.split('&'), l = lst.length; | |
for (var i = 0; i < l; i++) { | |
var p = lst[i].split('='); |
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
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Your Page</title> | |
<meta http-equiv="refresh" content="0;URL='http://URLexample.com/'" /> | |
</head> | |
<body> | |
<p>This page has moved to a <a href="http://URLexample.com/"> | |
URLexample.com</a>.</p> | |
</body> | |
</html> |
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
// other general wordpress optimizations, place in wp-config.php file before "That's all, stop editing!" line. | |
define('WP_DEBUG', false); | |
define('WP_POST_REVISIONS', 5); | |
define('AUTOSAVE_INTERVAL', 600); | |
define( 'EMPTY_TRASH_DAYS', 3 ); | |
define('WP_MEMORY_LIMIT','96M'); | |
define( 'WP_MAX_MEMORY_LIMIT', '128M' ); | |
// optional, remove this comment and the // below if you want to limit external requests in admin screens |
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
// Limit or restrict WordPress heartbeat to speed up wp-admin when many browser tabs are open or traffic is high | |
// Taken from http://wordpress.stackexchange.com/questions/166727/how-can-i-speed-up-my-wp-admin-section | |
function optimize_heartbeat_settings( $settings ) { | |
$settings['autostart'] = false; | |
$settings['interval'] = 60; | |
return $settings; | |
} | |
add_filter( 'heartbeat_settings', 'optimize_heartbeat_settings' ); |
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
.nodoBadge { | |
display: none !important; | |
} |
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
<script> | |
$(function () { | |
$('[href="#submit-form"]').click(function (ev) { | |
fbq('track','Lead'); | |
}); | |
}); | |
</script> |
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
<!-- parse email variable from url, load in header --> | |
<script> | |
function GetUrlValue(VarSearch) { | |
var SearchString = window.location.search.substring(1); | |
var VariableArray = SearchString.split('&'); | |
for (var i = 0; i < VariableArray.length; i++) { | |
var KeyValuePair = VariableArray[i].split('='); | |
if (KeyValuePair[0] == VarSearch) { | |
return KeyValuePair[1]; | |
} |
NewerOlder