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
<locationmatch "/bb-post.php"> | |
SecRuleRemoveById 300013 | |
SecRuleRemoveById 300015 | |
SecRuleRemoveById 300016 | |
SecRuleRemoveById 300017 | |
</locationmatch> |
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
<locationmatch "/wp-admin/admin-ajax.php"> | |
SecRuleRemoveById 300013 | |
SecRuleRemoveById 300015 | |
SecRuleRemoveById 300016 | |
SecRuleRemoveById 300017 | |
SecRuleRemoveById 949110 | |
SecRuleRemoveById 980130 | |
</locationmatch> | |
<locationmatch "/wp-admin/page.php"> |
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 | |
if( | |
strpos( $_SERVER['HTTP_REFERER'], 'wp-admin' ) === false && | |
strpos( $_SERVER['REQUEST_URI'], 'admin-ajax.php' ) !== false | |
) { | |
header( 'Cache-Control: max-age=30000, must-revalidate' ); | |
header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', strtotime( '+5000 minutes' ) ) . ' GMT' ); | |
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s', strtotime( '-5000 minutes' ) ) . ' GMT' ); | |
header( $_SERVER["SERVER_PROTOCOL"]." 404 Not Found" ); | |
die; |
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
function dcg_customise_dashboard() { | |
// remove_menu_page( 'index.php' ); //Dashboard | |
// remove_menu_page( 'jetpack' ); //Jetpack* | |
// remove_menu_page( 'edit.php' ); //Posts | |
// remove_menu_page( 'upload.php' ); //Media | |
// remove_menu_page( 'edit.php?post_type=page' ); //Pages | |
// remove_menu_page( 'edit-comments.php' ); //Comments | |
// remove_menu_page( 'themes.php' ); //Appearance | |
// remove_menu_page( 'plugins.php' ); //Plugins | |
// remove_menu_page( 'users.php' ); //Users |
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 | |
/** | |
* Display phone number field at checkout | |
* Add more here if you need to | |
*/ | |
function sumobi_edd_display_checkout_fields() { | |
// get user's phone number if they already have one stored | |
if ( is_user_logged_in() ) { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Get browser window size using jQuery (useful for responsive testing)</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(window).bind({ | |
load:function(){ |
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 this code in theme's search.php file where you want to display search results from Google. */ | |
$query = get_search_query(); | |
$query_new =str_replace(' ','%20',$query); | |
$url = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&start=0&rsz=8&q=".$query_new; | |
$body = file_get_contents($url); | |
$json = json_decode($body); |
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 | |
/***** EDIT BELOW LINES *****/ | |
$DB_Server = "localhost"; // MySQL Server | |
$DB_Username = "username"; // MySQL Username | |
$DB_Password = "password"; // MySQL Password | |
$DB_DBName = "databasename"; // MySQL Database Name | |
$DB_TBLName = "tablename"; // MySQL Table Name | |
$xls_filename = 'export_'.date('Y-m-d').'.xls'; // Define Excel (.xls) file name | |
/***** DO NOT EDIT BELOW LINES *****/ |
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 | |
/****** | |
Parallelize downloads across hostnames for WordPress. | |
Useful to boost static resources load speed on websites. | |
Recommended by GTmetrix, Pingdom, Google Speed Insights, and others. | |
See full post > https://medium.com/p/32e9dc2fec0c | |
In order to work properly, all subdomains/hostnames MUST have the same structure/path. Ex: | |
http://mydomain.com/wp-content/uploads/2015/11/myimage.jpg |