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
$args = array( | |
'post_parent' => $post->ID, | |
'post_type' => 'attachment', | |
'post_mime_type' => 'image/jpeg', | |
'orderby' => 'menu_order', | |
'order' => 'ASC', | |
'posts_per_page' => -1 | |
); | |
$slides = get_posts( $args ); |
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
# .gitignore file for WordPress that ignores everything except: | |
# | |
# - .gitignore | |
# - favicon.ico | |
# - wp-config.php | |
# - everything in mu-plugins | |
# - my-plugin | |
# - my-theme (except for .sass-cache) | |
# | |
# based on https://gist.github.com/jdbartlett/444295 |
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
[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
<?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
name: mysite2 | |
recipe: wordpress | |
config: | |
php: '7.2' | |
via: nginx | |
webroot: public | |
xdebug: true | |
conf: | |
php: .vscode/php.ini | |
proxy: |
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
{ | |
"folders": [ | |
{ | |
"path": "/path/to/my/workspace/folder" | |
} | |
], | |
"settings": { | |
"workbench.colorCustomizations": { | |
"titleBar.activeBackground": "#d12229", | |
"titleBar.activeForeground": "#ffffff", |
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
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
prefix = require('gulp-autoprefixer'), | |
sourcemaps = require('gulp-sourcemaps'), | |
livereload = require('gulp-livereload'), | |
input = { | |
'sass': [ | |
'sass/**/*.scss' | |
] |
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%'; |
NewerOlder