Skip to content

Instantly share code, notes, and snippets.

View dnaber-de's full-sized avatar
🏠
Working from home

David Naber dnaber-de

🏠
Working from home
View GitHub Profile
@dnaber-de
dnaber-de / wp-media-playground.js
Created October 21, 2015 17:05
Play around with the wp.media API
myGlobalFrame = null;
/**
* @param wp wp namespace
* @param Backbone
* @param $ jQuery
*/
;( function( wp, Backbone, $ ) {
'use strict';
var myLibrary = wp.media.controller.FeaturedImage.extend(
@dnaber-de
dnaber-de / test.php
Created February 8, 2016 15:44
Approach on Monkey::action expects different values on consecutive calls
<?php
Brain\Monkey::actions()
->expectFired( 'do_something' )
->twice()
->withArgs(
[
'first',
'second'
]
);
@dnaber-de
dnaber-de / informer-disable-queue.php
Last active May 24, 2016 08:09
Disable mail queue of Informer (WP Plugin) to send all emails at once.
<?php
/**
* Plugin Name: Informer – disable mail queue
* Description: Deactivates the queueing of mails in <em>Informer</em>
* Author: Inpsyde GmbH
* Author URI: http://inpsyde.com
* License: MIT
* Plugin URI: https://gist.github.com/dnaber-de/550520b5cdaf13987281bb159361b56f
*/