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:
<?php | |
// hack to make pantheon work with subdirectory multisite | |
add_action( 'wpmu_new_blog', function( $blog_id, $user_id, $domain, $path, $site_id, $meta ) { | |
if ( defined( 'SUBDOMAIN_INSTALL' ) && ! SUBDOMAIN_INSTALL ) { | |
$abspath = untrailingslashit( ABSPATH ); | |
$subpath = $abspath . untrailingslashit( $subpath ); | |
if ( ! is_dir( $path ) ) |
<?php | |
class custom_feed { | |
public $feed = 'custom-xml'; | |
public function __construct() { | |
add_action( 'init', array( $this, 'init' ) ); | |
{ | |
"type": "object", | |
"properties": { | |
"audience": { | |
"type": "object", | |
"properties": { | |
"include": { | |
"type": "string", | |
"enum": [ | |
"any", |
<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 | |
}) |
<?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 { |
<?php | |
/** | |
* Enable dev mode vendor packages. | |
*/ | |
if ( ! defined( 'SCRIPT_DEBUG' ) || ! SCRIPT_DEBUG ) { | |
return; | |
} | |
add_action( 'init', function () { |
#!/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']; |
<?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 ); |
I hereby claim:
To claim this, I am signing this object:
<?php | |
/** | |
* Fixes sticky post ordering in WordPress anywhere the order is not explicitly defined. | |
* | |
* Updates a post's menu order whenever the sticky posts option is updated | |
* | |
* Props to Simon Fransson of http://dessibelle.se/ for a bugfix where 'unstickied' posts were not updated | |
* | |
* @param Array $stickies An array of post IDs |