View logging.php
<?php | |
namespace Simon\Src\Log; | |
// How to use this class: | |
// |
View .htaccess
# e.g. https://example.org/go/76 | |
RewriteEngine On | |
RewriteRule ^go/([0-9]+)$ ?p=$1 [R=301,L] |
View delete-spam-comment.sql
delete from wp_comments where comment_approved='spam'; | |
delete from wp_commentmeta where comment_id not in (select comment_id from wp_comments); | |
delete from wp_commentmeta where meta_key like '%akismet%'; |
View limit-checkboxes.js
$( '.things' ).click( function() { | |
var bol = $( '.things:checked' ).length >= 8; | |
$( '.things' ).not( ':checked' ).attr( 'disabled', bol ); | |
}); | |
// from http://stackoverflow.com/questions/2966382/limit-checkbox-amount |
View dequeue-wordpress-block-library-styles.php
add_action( 'wp_enqueue_scripts', 'simon_dequeue_block_editor_styles' ); | |
function simon_dequeue_block_editor_styles() { | |
if ( 'classic' === get_option( 'classic-editor-replace' ) ) { | |
wp_dequeue_style( 'wp-block-library' ); | |
} | |
} |
View tiny-mce.php
<?php | |
defined( 'ABSPATH' ) or die(); | |
$lumpy_lemon_tiny_mce = new lumpy_lemon_tiny_mce; |
View .htaccess
Header always set Strict-Transport-Security "max-age=31536000" env=HTTPS | |
Header set X-Powered-By "WordPress and Lumpy Lemon" | |
AddDefaultCharset UTF-8 | |
<IfModule mod_mime.c> | |
AddCharset UTF-8 .atom .css .js .json .rss .vtt .xml | |
</IfModule> | |
<IfModule mod_headers.c> |
View vs-code-settings.json
{ | |
"folders": [ | |
{ | |
"path": "/path/to/my/workspace/folder" | |
} | |
], | |
"settings": { | |
"workbench.colorCustomizations": { | |
"titleBar.activeBackground": "#d12229", | |
"titleBar.activeForeground": "#ffffff", |
View .lando.yml
name: kirby | |
proxy: | |
appserver: | |
- kirby.lndo.site | |
mailhog: | |
- mail.kirby.lndo.site | |
services: | |
appserver: | |
type: php:7.2 | |
via: apache |
NewerOlder