Instructions for how to install a WordPress plugin that is stored in a Gist (example).
There are three ways to do it:
<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><style type="text/css">@import url('https://themes.googleusercontent.com/fonts/css?kit=Ry7ZpkCWHRNK4QK2VqZc1A');.lst-kix_iksx4snm8e8q-8>li:before{content:"\0025a0 "}ul.lst-kix_iksx4snm8e8q-5{list-style-type:none}.lst-kix_iksx4snm8e8q-4>li:before{content:"\0025cb "}ul.lst-kix_iksx4snm8e8q-4{list-style-type:none}ul.lst-kix_iksx4snm8e8q-3{list-style-type:none}ul.lst-kix_iksx4snm8e8q-2{list-style-type:none}ul.lst-kix_iksx4snm8e8q-1{list-style-type:none}ul.lst-kix_iksx4snm8e8q-0{list-style-type:none}.lst-kix_iksx4snm8e8q-2>li:before{content:"\0025a0 "}.lst-kix_iksx4snm8e8q-3>li:before{content:"\0025cf "}.lst-kix_iksx4snm8e8q-0>li:before{content:"\0025cf "}.lst-kix_iksx4snm8e8q-1>li:before{content:"\0025cb "}ul.lst-kix_iksx4snm8e8q-8{list-style-type:none}ul.lst-kix_iksx4snm8e8q-7{list-style-type:none}ul.lst-kix_iksx4snm8e8q-6{list-style-type:none}.lst-kix_iksx4snm8e8q-5>li:before{content:"\0025a0 "}.lst-kix_iksx4snm8e8q-6>li:befor |
const postcss = require( 'postcss' ); | |
const getColors = require( 'get-css-colors' ); | |
/* A size is any number, optionally with a unit. */ | |
const isSize = ( value ) => /^\d+\s?([a-zA-Z]+)?$/.test( value.trim() ); | |
/* If the value has a color in it, getColors will return an array. */ | |
const isColor = ( value ) => null !== getColors( value ); | |
/* A line style is from a set of values */ |
<?php | |
/** | |
* AMP Validation Error Logger plugin initialization file. | |
* | |
* @package AMP_Validation_Error_Logger | |
* @author Weston Ruter, Google | |
* @license GPL-2.0-or-later | |
* @copyright 2019 Google Inc. | |
* | |
* @wordpress-plugin |
Instructions for how to install a WordPress plugin that is stored in a Gist (example).
There are three ways to do it:
function getDocumentImages() { | |
return performance.getEntriesByType('resource') | |
.map( ( entry ) => entry.name ) | |
.filter( ( url ) => { | |
const parsedUrl = new URL( url ); | |
return /\.(png|jpe?g|gif|webp|svg)$/i.test( parsedUrl.pathname ); | |
} ); | |
} |
[better title needed]
[insert table of contents]
WordPress uses a JavaScript task runner called Grunt to build its files. It requires the most recent LTS version of the Node.js runtime. It also requires dependencies fetched via npm. npm is packaged with Node.js, so if your computer has Node.js installed you are ready to go.
<?php | |
if ( defined( 'WP_CLI' ) && WP_CLI ) { | |
class JW_Random_Posts extends WP_CLI_Command { | |
private $args, $assoc_args; | |
/** | |
* Generates a Random set of posts | |
* |
<?php | |
add_filter( 'rest_authentication_errors', function( $result ) { | |
if ( ! empty( $result ) ) { | |
return $result; | |
} | |
if ( ! is_user_logged_in() ) { | |
return new WP_Error( 'restx_logged_out', 'Sorry, you must be logged in to make a request.', array( 'status' => 401 ) ); | |
} | |
return $result; |
#!/bin/bash | |
REV=$1 | |
svn up --ignore-externals . > /dev/null | |
svn merge -c$REV ../../trunk . | |
LOG=$(svn log -r$REV ../../trunk | grep -v '\-------' | tail -n +3) | |
BRANCH=$(basename $(pwd)) | |
echo -en "$LOG\n\nMerges [$REV] to the $BRANCH branch." | pbcopy | |
echo "" | |
pbpaste |