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
<meta http-equiv="cache-control" content="max-age=0" /> | |
<meta http-equiv="cache-control" content="no-cache" /> | |
<meta http-equiv="expires" content="0" /> | |
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" /> | |
<meta http-equiv="pragma" content="no-cache" /> |
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 | |
/** | |
* Replace this line from your wp-config.php file | |
* "define('WP_DEBUG', false);" | |
* with these commands below. | |
*/ | |
ini_set('log_errors', 'On'); | |
ini_set('display_errors', 'Off'); | |
ini_set('error_reporting', E_ALL); | |
define('WP_DEBUG', false); |
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
# Browser Caching – Add Expire Headers to WordPress | |
# BEGIN Expire headers | |
<ifModule mod_expires.c> | |
ExpiresActive On | |
ExpiresDefault "access plus 5 seconds" | |
ExpiresByType image/x-icon "access plus 2592000 seconds" | |
ExpiresByType image/jpg "access plus 1 year" | |
ExpiresByType image/jpeg "access plus 1 month" | |
ExpiresByType image/png "access plus 1 month" |
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
<IfModule mod_deflate.c> | |
# Compress HTML, CSS, JavaScript, Text, XML and fonts | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
AddOutputFilterByType DEFLATE application/x-font | |
AddOutputFilterByType DEFLATE application/x-font-opentype | |
AddOutputFilterByType DEFLATE application/x-font-otf | |
AddOutputFilterByType DEFLATE application/x-font-truetype | |
AddOutputFilterByType DEFLATE application/x-font-ttf |
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 | |
/** | |
* Disable the emoji's | |
*/ | |
function disable_emojis() | |
{ | |
remove_action('wp_head', 'print_emoji_detection_script', 7); | |
remove_action('admin_print_scripts', 'print_emoji_detection_script'); | |
remove_action('wp_print_styles', 'print_emoji_styles'); | |
remove_action('admin_print_styles', 'print_emoji_styles'); |
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
RewriteEngine on | |
RewriteCond %{HTTP_REFERER} !^$ | |
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC] | |
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L] |
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 | |
/** | |
* Displaying first name and last name fields on | |
* WooCommerce's registration page. | |
*/ | |
function woocommerce_register_form() { | |
$fields = array( | |
'first_name' => __('First name', 'woocommerce'), |
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 the code below to your theme's functions.php file | |
* to add a confirm password field on the register form under My Accounts. | |
*/ | |
function woocommerce_registration_errors_validation($reg_errors, $sanitized_user_login, $user_email) { | |
global $woocommerce; | |
extract( $_POST ); | |
if ( strcmp( $password, $password2 ) !== 0 ) { |
OlderNewer