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
# BEGIN Cache-Control Headers | |
<ifModule mod_headers.c> | |
<filesMatch "\.(ico|jpe?g|png|gif|swf)$"> | |
Header set Cache-Control "max-age=2592000, public" | |
</filesMatch> | |
<filesMatch "\.(css)$"> | |
Header set Cache-Control "max-age=604800, public" | |
</filesMatch> | |
<filesMatch "\.(js)$"> | |
Header set Cache-Control "max-age=216000, private" |
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
# BEGIN Cache-Control Headers | |
<ifModule mod_headers.c> | |
<filesMatch "\.(ico|jpe?g|png|gif|swf)$"> | |
Header set Cache-Control "public" | |
</filesMatch> | |
<filesMatch "\.(css)$"> | |
Header set Cache-Control "public" | |
</filesMatch> | |
<filesMatch "\.(js)$"> | |
Header set Cache-Control "private" |
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
#BEGIN EXPIRES HEADERS | |
<IfModule mod_expires.c> | |
# Enable expirations | |
ExpiresActive On | |
# Default expiration: 1 hour after request | |
ExpiresDefault "now plus 1 hour" | |
# CSS and JS expiration: 1 week after request | |
ExpiresByType text/css "now plus 1 week" | |
ExpiresByType application/javascript "now plus 1 week" | |
ExpiresByType application/x-javascript "now plus 1 week" |
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
# BEGIN GZIP COMPRESSION | |
<IfModule mod_gzip.c> | |
mod_gzip_on Yes | |
mod_gzip_dechunk Yes | |
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ | |
mod_gzip_item_include handler ^cgi-script$ | |
mod_gzip_item_include mime ^text/.* | |
mod_gzip_item_include mime ^application/x-javascript.* | |
mod_gzip_item_exclude mime ^image/.* | |
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* |
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
# BEGIN DEFLATE COMPRESSION | |
<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 |
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
//Definir UTF-8 en wp-config | |
define('DB_CHARSET', 'utf-8'); |
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
//HTML5 | |
<meta charset=”utf-8″ /> | |
//HTML 4 | |
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ /> (HTML 4) | |
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
/* | |
Replace SKU on WooCommerce for Other word. | |
*/ | |
add_filter('gettext', 'change_sku', 999, 3); | |
function change_sku( $translated_text, $text, $domain ) { | |
if( $text == 'SKU' || $text == 'SKU:' ) return 'CODE'; | |
return $translated_text; | |
} |
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
/** | |
* Embed Gists with a URL | |
* | |
* Usage: | |
* Paste a gist link into a blog post or page and it will be embedded eg: | |
* https://gist.github.com/2926827 | |
* | |
* If a gist has multiple files you can select one using a url in the following format: | |
* https://gist.github.com/2926827?file=embed-gist.php | |
* |