Skip to content

Instantly share code, notes, and snippets.

View ntorga's full-sized avatar

Northon Torga ntorga

View GitHub Profile
# RESTRICT ACCESS
deny from all
@ntorga
ntorga / ca-bundle.crt
Created November 7, 2015 16:35
WordPress CA Root Certificates
##
## src/wp-includes/certificates/ca-bundle.crt -- Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Tue Jan 28 09:38:07 2014
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## http://mxr.mozilla.org/mozilla-release/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1
##
# #######################################################################################
# # HARDENING WORDPRESS VIA HTACCESSS BY INFINITE.SX #
# # Special thanks to iThemes Security, Boilerplate, WP Codex, Feross, Perishable Press #
# #######################################################################################
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Block HTTP request methods that are unused by browsers
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<IfModule mod_rewrite.c>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \;
add_action( 'wp_enqueue_scripts', 'credit_card_cielo_fix' );
function credit_card_cielo_fix () {
if ( is_checkout() ) {
wp_enqueue_style( 'woo-css', 'https://seudominio.com/wp-content/plugins/woocommerce/assets/css/woocommerce.css' );
}
}
add_action( 'wp_enqueue_scripts', 'remove_unnecessary_requests', 99 );
function remove_unnecessary_requests() {
// Seu código vem aqui
}
$url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
if (strpos($url,'kb') === false xor strpos($url,'wiki') === false xor strpos($url,'knowledgebase') === false ) {
// Remove from any page which is not Wiki
}
if (strpos($url,'suporte') === false) {
// Remove from any page which is not Support
wp_dequeue_style( 'kbe_theme_style' );
wp_dequeue_script('kbe_live_search');
remove_action('wp_head', 'kbe_search_drop');
remove_action('wp_print_scripts', 'kbe_live_search');
remove_action('wp_head', 'st_add_live_search');
remove_action('wp_head', 'count_bg_color');
wp_dequeue_style( 'ap-style' );
wp_dequeue_style( 'ap-responsive' );
wp_dequeue_style( 'ap-fonts' );
wp_dequeue_style( 'ap-overrides' );
wp_dequeue_script( 'ap-functions-js' );
wp_dequeue_script( 'ap-anspress_script' );
wp_dequeue_script( 'peity-js' );
wp_dequeue_script( 'ap-initial.js' );
wp_dequeue_script( 'ap-scrollbar.js' );
wp_dequeue_script( 'ap-js' );