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_rewrite.c> | |
RewriteEngine On | |
# Het betreft geen request voor `robots.txt`/`bots-forbidden.php`: | |
RewriteCond %{REQUEST_URI} !(robots.txt|bots-forbidden.php) | |
# User-Agents van bots die geen toegang (behalve `robots.txt`/`bots-forbidden.php`) mogen hebben: | |
RewriteCond %{HTTP_USER_AGENT} Amazonbot [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} AhrefsBot [NC,OR] | |
RewriteCond %{HTTP_USER_AGENT} Bytespider [NC,OR] |
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
#!/bin/bash | |
##################################################################################### | |
# # | |
# Cronjob command: # | |
# # | |
# bash /home/DA_USER/redis-monitoring/monitor >/dev/null 2>&1 # | |
# # | |
##################################################################################### |
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 | |
/** | |
* You can add this code inside your (child) theme's `functions.php` | |
* or within a PHP-file inside your `mu-plugins` folder | |
**/ | |
/** | |
* Adds the shortcode [glossary-total] | |
* |
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 the checkout steps so the customer knows where they are. | |
* | |
* The output uses classes of Bootstrap 4 and the icons of FontAwesome (Free) | |
**/ | |
function onx_woocommerce_checkout_steps() | |
{ | |
echo '<nav id="woo-checkout-steps" class="nav nav-pills nav-justified mb-4" role="navigation">'; |
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
# Paths: DirectAdmin | |
# USER: change to correct username | |
# DOMAIN: change to the correct domainname | |
# Core stuff | |
$ wp core version --path=/home/USER/domains/DOMAIN/public_html/ | |
$ wp core download --skip-content --force --version=latest --path=/home/USER/domains/DOMAIN/public_html/ | |
$ wp core update-db --path=/home/USER/domains/DOMAIN/public_html/ --dry-run | |
$ wp core verify-checksums --path=/home/USER/domains/DOMAIN/public_html/ |
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 | |
# Check: https://onexa.nl/wordpress/toolbar-link-redis-object-cache/ | |
/** | |
* Add a link to the Admin Toolbar to easily flush the Redis cache (Redis Object Cache plugin) | |
* | |
* @author Hiranthi Herlaar, onexa.nl | |
* @version 2.0 | |
* |
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_rewrite.c> | |
RewriteEngine On | |
RewriteBase // | |
RewriteCond %{REQUEST_URI} ^/wp-content/uploads | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /index.php [L,R=410] | |
</IfModule> |
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
#!/bin/bash | |
# WP_PATH definiëren | |
export WP_PATH=$(pwd) | |
search_adsformarket="snippet.adsformarket.com" | |
file_adsformarket="../adsformarket.txt" | |
touch $file_adsformarket | |
adsformarketmalfiles=$(find -type f | grep -liR "${search_adsformarket}" $WP_PATH) |
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 | |
# just add the needed form IDs to the array | |
$forms = array( '6', '7' ); | |
# looping through the array to add an 'add_filter' for each | |
foreach ( $forms as $i => $form ) | |
add_filter( "gform_field_validation_{$form}", 'custom_zip_validation', 10, 4 ); | |
# the 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 | |
function my_custom_gravityforms_encrypt( $to_encrypt ) | |
{ | |
if ( '' === $to_encrypt ) return null; | |
if ( function_exists('openssl_encrypt') && function_exists('openssl_random_pseudo_bytes') ) | |
{ | |
$iv = openssl_random_pseudo_bytes( openssl_cipher_iv_length( 'aes-256-cbc' ) ); | |
$encrypted = openssl_encrypt( $to_encrypt, 'aes-256-cbc', MY_CUSTOM_GF_ENCRYPTION_KEY, 0, $iv ); |
NewerOlder