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
#Set caching on image files for 11 months | |
<filesMatch "\.(ico|gif|jpg|png|svg)$"> | |
ExpiresActive On | |
ExpiresDefault "access plus 11 month" | |
Header append Cache-Control "public" | |
</filesMatch> | |
<filesMatch "\.(css|js)$"> | |
ExpiresActive On | |
ExpiresDefault "access plus 1 week" |
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
<link href="https://opensource.keycdn.com/fontawesome/4.5.0/font-awesome.min.css" rel="stylesheet"> |
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 src="https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js"></script> | |
<script> | |
WebFont.load({ | |
google: { | |
families: ['Source+Serif+Pro:400,600,700'] | |
} | |
}); | |
</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
<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 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
gzip on; | |
gzip_comp_level 2; | |
gzip_http_version 1.0; | |
gzip_proxied any; | |
gzip_min_length 1100; | |
gzip_buffers 16 8k; | |
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
gzip_disable "MSIE [1-6].(?!.*SV1)"; | |
gzip_vary on; |
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
#Apache WebP Configuration | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTP_ACCEPT} image/webp | |
RewriteCond %{DOCUMENT_ROOT}/$1.webp -f | |
RewriteRule ^(wp-content/uploads.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1] | |
</IfModule> | |
<IfModule mod_headers.c> | |
Header append Vary Accept env=REDIRECT_accept |
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
//* Get file size for all of your items in the Media library | |
//* URL: https://wordpress.stackexchange.com/questions/237131/display-image-file-size-in-media-library | |
add_filter( 'manage_upload_columns', 'wpse_237131_add_column_file_size' ); | |
add_action( 'manage_media_custom_column', 'wpse_237131_column_file_size', 10, 2 ); | |
function wpse_237131_add_column_file_size( $columns ) { // Create the column | |
$columns['filesize'] = 'File Size'; | |
return $columns; | |
} |
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
//* Plugin Name: Show Dimensions in Library | |
function susanta_show_dimensions_size_column_register($columns) { | |
/* translators: Column name */ | |
$columns['dimensions'] = __('Dimensions', 'show-dimensions-in-library'); | |
return $columns; | |
} | |
function susanta_show_dimensions_size_column_display($column_name, $post_id) { |
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
<iframe | |
src='https://spotwalla.com/embed.php?id=54321abcd321&scale=on&zoom=default&refresh=no&hoursPast=0&showAll=yes' | |
width='100%' | |
height='600' | |
scrolling='no' | |
frameborder='0'> | |
Embedding failed because inline frames are not supported by your browser or the web server. | |
</iframe> |
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(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); | |
// Creates an adblock detection plugin. | |
ga('provide', 'adblockTracker', function(tracker, opts) { | |
var ad = document.createElement('ins'); | |
ad.className = 'AdSense'; |