Skip to content

Instantly share code, notes, and snippets.

View ataylorme's full-sized avatar

Andrew Taylor ataylorme

View GitHub Profile
@ataylorme
ataylorme / .lando.yml
Created February 25, 2019 21:18
Lando file for running WordHat tests locally
name: ataylor-local-behat
services:
# Spin up a PHP CI service for Behat, PHPUnit, etc.
ci_php:
type: php:custom
overrides:
image: quay.io/pantheon-public/build-tools-ci:4.x
# Additional "lando" commands
From 78502e76a598b65d67ae6ea6216f1319debc59e9 Mon Sep 17 00:00:00 2001
From: ataylorme <andrew@ataylor.me>
Date: Wed, 12 Sep 2018 16:16:35 -0700
Subject: [PATCH 1/1] Use get_home_url instead of get_site_url in lh-hsts
plugin
---
web/wp-content/plugins/lh-hsts/lh-hsts.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@ataylorme
ataylorme / gist:55bb0ba93026f1c43af4487aaa61efae
Created June 28, 2018 17:39
Solr Power Custom Field Filter Example
<?php
function filter_solr_index_custom_fields( $facet_on_custom_fields ) {
$car_custom_fields = array(
'vehicle_cylinders',
'vehicle_drive_type',
'vehicle_fuel_type',
'vehicle_transmission',
'vehicle_year',
);

Keybase proof

I hereby claim:

  • I am ataylorme on github.
  • I am ataylorme (https://keybase.io/ataylorme) on keybase.
  • I have a public key ASCKk31Y0ixruyL6tTEYLZytjyRP5h0QTauZubk1SBwfrQo

To claim this, I am signing this object:

@ataylorme
ataylorme / books-cpt-metabox.php
Last active April 17, 2024 17:27
Books WordPress REST API Example
<?php
function register_books_cpt() {
$args = array(
'labels' => array(
'name' => _x( 'Books', 'post type general name' ),
'singular_name' => _x( 'Book', 'post type singular name' ),
),
'description' => '',
'hierarchical' => false,
# Composer Vendor Directory #
#############################
vendor/
# Webroot #
###########
!web/
web/*
!web/index.php
!web/wp-cli.yml
{
"name": "WordPress-Composer-Example",
"description": "",
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org"
},
{
"type": "package",
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*
<?php
// Tells WordPress to load the WordPress theme and output it.
define('WP_USE_THEMES', true);
// Loads the WordPress Environment and Template
require( dirname( __FILE__ ) . '/wp/wp-blog-header.php' );
{
"name": "WordPress-Composer-Example",
"description": "",
"repositories": [
{
"type": "package",
"package": {
"name": "pantheon-systems/wordpress",
"version": "4.7.2",
"dist": {