Presentation by Robert O'Rourke Principal Engineer @ Human Made
This file contains hidden or 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
{ | |
"type": "object", | |
"properties": { | |
"audience": { | |
"type": "object", | |
"properties": { | |
"include": { | |
"type": "string", | |
"enum": [ | |
"any", |
This file contains hidden or 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 | |
/** | |
* Wrapper for WP_Query that performs a prefix search. | |
* | |
* @param string $url The URL string to search for. | |
* @param array $args Args to pass to WP_Query | |
* @return WP_Query | |
*/ | |
function ep_url_prefix_search( string $url, array $args = [] ) : WP_Query { |
This file contains hidden or 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
#!/usr/bin/env php | |
<?php | |
$plugins = file_get_contents( 'https://packagist.org/packages/list.json?type=wordpress-plugin' ); | |
$muplugins = file_get_contents( 'https://packagist.org/packages/list.json?type=wordpress-muplugin' ); | |
$dropins = file_get_contents( 'https://packagist.org/packages/list.json?type=wordpress-dropin' ); | |
$themes = file_get_contents( 'https://packagist.org/packages/list.json?type=wordpress-theme' ); | |
$plugins_json = json_decode( $plugins, true )['packageNames']; | |
$muplugins_json = json_decode( $muplugins, true )['packageNames']; |
This file contains hidden or 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 | |
/** | |
* Enable dev mode vendor packages. | |
*/ | |
if ( ! defined( 'SCRIPT_DEBUG' ) || ! SCRIPT_DEBUG ) { | |
return; | |
} | |
add_action( 'init', function () { |
This file contains hidden or 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 | |
add_filter( 'the_content', function ( $content ) { | |
// Fix layouts HTML. | |
libxml_use_internal_errors( true ); | |
$dom = new \DOMDocument( '1.0', 'UTF-8' ); | |
$dom->loadHTML( utf8_decode( $content ) ); | |
$xpath = new \DOMXPath( $dom ); |
This file contains hidden or 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
<script> | |
jQuery( document ).on( 'nfFormReady', function() { | |
nfRadio.channel('forms').on('submit:response', function(form) { | |
window.dataLayer = window.dataLayer||[]; | |
dataLayer.push({ | |
event: 'ninjaFormSubmission', | |
eventData: form.data, | |
formID: form.data.form_id, | |
formTitle: form.data.settings.title | |
}) |
This file contains hidden or 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
### Keybase ### | |
function pb() { | |
echo "$@" | pbcopy | |
} | |
# Usage: kbm 'message' <usernames...> | |
alias kbm='pb keybase encrypt -m' |
This file contains hidden or 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 | |
// disable /blog prefix on url permalinks | |
foreach ( array( 'permalink_structure', 'category_base', 'tag_base' ) as $option ) { | |
add_filter( "option_{$option}", function ( $value ) { | |
return preg_replace( '|^/?blog|', '', $value ); | |
}, 10, 1 ); | |
} |
I hereby claim:
- I am roborourke on github.
- I am robo (https://keybase.io/robo) on keybase.
- I have a public key whose fingerprint is 779C 084C 30CA 91E6 4B0C 9242 ED5B EDB9 0BBA 458F
To claim this, I am signing this object:
NewerOlder