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
[style*="--aspect-ratio"] { | |
aspect-ratio: var(--aspect-ratio); | |
object-fit: cover; | |
} | |
@supports not (aspect-ratio) { | |
[style*="--aspect-ratio"] { | |
position: relative; | |
} | |
[style*="--aspect-ratio"]::before { |
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
add_filter( 'searchwp\statistics\log', 'my_log_filter', 10, 2 ); | |
function my_log_filter( $enabled, $query ) { | |
$search_string = $query->get_keywords(); | |
$long = ( strlen( $search_string ) > 30 ); | |
$www = ( 'www' === substr( $search_string, 0, 3 ) ); | |
$slashes = ( false !== strpos( $search_string, '/' ) ); | |
if ( $long or $www or $slashes ) { |
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 | |
namespace Simon\Src\Log; | |
// How to use this class: | |
// |
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
# e.g. https://example.org/go/76 | |
RewriteEngine On | |
RewriteRule ^go/([0-9]+)$ ?p=$1 [R=301,L] |
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
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%'; |
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
$( '.things' ).click( function() { | |
var bol = $( '.things:checked' ).length >= 8; | |
$( '.things' ).not( ':checked' ).attr( 'disabled', bol ); | |
}); | |
// from http://stackoverflow.com/questions/2966382/limit-checkbox-amount |
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
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' ); | |
} | |
} |
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 | |
defined( 'ABSPATH' ) or die(); | |
$lumpy_lemon_tiny_mce = new lumpy_lemon_tiny_mce; |
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
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> |
NewerOlder