Skip to content

Instantly share code, notes, and snippets.

View paulgibbs's full-sized avatar

Paul Wong-Gibbs paulgibbs

View GitHub Profile
@paulgibbs
paulgibbs / lighthouse.yml
Last active June 9, 2023 19:04
Indigo Tree LHCI
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: Run Lighthouse checks
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "12 2 * * *"
{"version":1,"resource":"file:///Users/paulgibbs/Sites/platform/my-platform/.gitignore","entries":[{"id":"TIY3","timestamp":1650021010387}]}
<?php
function pggh_post_type_filter( $use_block_editor, $post_type ) {
if ( 'page' === $post_type ) {
return false;
}
return $use_block_editor;
}
add_filter( 'use_block_editor_for_post_type', 'pggh_post_type_filter', 10, 2 );
cy
.window()
.its('wp')
.then(wp => {
wp.blocks.getBlockTypes().forEach(({ name }) => {
wp.data.dispatch('core/editor').insertBlocks( wp.blocks.createBlock(name, {}) );
});
});
@paulgibbs
paulgibbs / old.php
Created July 2, 2020 13:56
php generators example
<?php
/**
* Plugin Name: Paul Test
*/
namespace PaulGibbs;
use Generator;
use WP_Query;
@paulgibbs
paulgibbs / Paul.php
Created March 4, 2020 13:36
replace a taxonomy template with a rendered post template
<?php
/**
* Plugin Name: Render a specific Post on a Taxonomy archive page.
* Plugin Author: Paul Gibbs.
* License: public domain
*/
namespace paul;
use WP_Post;
<?php
/**
* Hello World.
*/
namespace HelloWorld;
$_tests_dir = getenv( 'WP_TESTS_DIR' ) ?: getenv( 'WP_PHPUNIT__DIR' );
require_once $_tests_dir . '/includes/functions.php';
version: "3"
services:
wordpress:
container_name: "docker_wordpress_1"
depends_on:
- db
- memcached
- selenium
environment:
@paulgibbs
paulgibbs / -
Created January 23, 2019 14:46
hi
default:
suites:
default:
contexts:
- PaulGibbs\WordpressBehatExtension\Context\WordpressContext
- Behat\MinkExtension\Context\MinkContext
- PaulGibbs\WordpressBehatExtension\Context\ContentContext
- PaulGibbs\WordpressBehatExtension\Context\DashboardContext
- PaulGibbs\WordpressBehatExtension\Context\SiteContext
- PaulGibbs\WordpressBehatExtension\Context\UserContext