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
## START EXPIRES CACHING ## | |
ExpiresActive On | |
ExpiresByType image/jpg "access 1 year" | |
ExpiresByType image/jpeg "access 1 year" | |
ExpiresByType image/gif "access 1 year" | |
ExpiresByType image/png "access 1 year" | |
ExpiresByType text/css "access plus 1 month" | |
ExpiresByType text/html "access 1 month" | |
ExpiresByType application/pdf "access 1 month" | |
ExpiresByType text/x-javascript "access 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> | |
AddOutputFilterByType DEFLATE text/plain | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/xml | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE application/xml | |
AddOutputFilterByType DEFLATE application/xhtml+xml | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/x-javascript |
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 # https://keithgreer.uk/wordpress-code-completely-disable-comments-using-functions-php | |
/* PURPOSE | |
* Disable comments on ALL post types | |
* remove/hide any existing comments | |
* from displaying and hide forms. | |
*/ | |
/* INSTALL | |
* Add into your active theme's functions.php file. |
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
/* | |
* Usage: $countries['GB'] will return "826", the UK's ISO 3166-1 numeric three-digit code. | |
*/ | |
$countries = [ | |
'AF' => '004', | |
'AX' => '248', | |
'AL' => '008', | |
'DZ' => '012', | |
'AS' => '016', |
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
/* | |
* Usage: $calling_codes['GB'] will return "44", the UK's dialing code. | |
*/ | |
$calling_codes = [ | |
'BD' => '880', | |
'BE' => '32', | |
'BF' => '226', | |
'BG' => '359', | |
'BA' => '387', |
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 | |
// Initilise cURL | |
$ch = curl_init(); | |
// Set the cURL Options | |
$optArray = array( | |
CURLOPT_URL => 'https://example.com/api/getInfo/', | |
CURLOPT_RETURNTRANSFER => true | |
); |
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 | |
// Rename posts in the admin menu | |
function update_post_label() { | |
global $menu; | |
global $submenu; | |
$submenu['edit.php'][5][0] = 'Story'; | |
$submenu['edit.php'][10][0] = 'Add Story'; | |
$submenu['edit.php'][16][0] = 'Story Tags'; | |
$menu[5][0] = 'Stories'; |
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
.eucookie-pop-up { display:none; position:fixed; z-index:9999; bottom:0; left:0; right:0; background:#dc143c; color:#fff; margin:1em; padding:0.5em; text-align:center; } | |
.eucookie-pop-up .dismiss { float:right; width:7% text-align:center; padding-top:1em; } | |
.eucookie-pop-up .dismiss a { color:#fff; cursor:pointer; font-weight:bold; font-size:150%; padding:1em; } | |
.eucookie-pop-up .content { float:left; width:92%; text-align:center; } | |
.eucookie-pop-up .content a { text-decoration: underline;color:#fff } |
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 | |
// Forked from https://gist.github.com/1809044 | |
// Available from https://keithgreer.uk/git-automatically-deploy-website-github | |
// Check if client is allowed | |
$allowed_ips = array( | |
'207.97.227.', '50.57.128.', '108.171.174.', '50.57.231.', '204.232.175.', '192.30.252.', // GitHub | |
'123.123.123.123' // Your own IP address | |
); |
NewerOlder