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
# Description | |
For some reason the Laravel Docs don't have a scrollable Table of Contents. Nor a "back to top"-link. Which I found very annoying.. Luckily that was rather easily fixed with a bit of custom CSS/JS "magic" ;-) | |
# What you need: | |
1. A browser extension for adding custom CSS and JS to websites of your choice. | |
a. User Javascript and CSS (Chrome): https://chromewebstore.google.com/detail/user-javascript-and-css/nbhcbdghjpllgmfilhnhkllmkecfmpld | |
b. Firemonkey (Firefox): https://addons.mozilla.org/nl/firefox/addon/firemonkey/ | |
2. Settings (based on the Chrome extension, which I use): | |
a. URL pattern: `https://laravel.com/docs/*` |
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_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 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
#!/bin/bash | |
##################################################################################### | |
# # | |
# Cronjob command: # | |
# # | |
# bash /home/DA_USER/redis-monitoring/monitor >/dev/null 2>&1 # | |
# # | |
##################################################################################### |
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
<?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 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_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 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
#!/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 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
<?php | |
add_filter( 'template', 'onx_change_theme' ); | |
add_filter( 'option_template', 'onx_change_theme' ); | |
add_filter( 'option_stylesheet', 'onx_change_theme' ); | |
add_filter( 'pre_option_stylesheet', 'onx_change_theme' ); | |
function onx_change_theme( $theme ) | |
{ | |
if ( is_admin() && ( function_exists( 'wp_get_current_user' ) ) ) | |
{ |
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
<?php | |
function onx_redirect_edit_page_to_elementor() | |
{ | |
global $post, $pagenow; | |
if ( ! isset( $post->ID ) || current_user_can( 'manage_options' ) ) return; | |
if ( ( ( $pagenow == 'post.php' ) && ( get_post_type() == 'page' ) ) && ( current_user_can( 'editor' ) || current_user_can( 'author' ) ) ) | |
{ |
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
# 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 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
<?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 |
NewerOlder