Skip to content

Instantly share code, notes, and snippets.

View seanr's full-sized avatar

Sean Robertson seanr

View GitHub Profile
@steinmb
steinmb / gist:6354634
Last active December 21, 2015 19:29
Stolen from @seanr with his blessing. Releasing the power of EntityFieldQuery(). The basic idea with this code is it's a ctools content type that allows you to dynamically build a sort of "mini-view" with a very limited set of options, so the user can arbitrarily pull content according to a limited set of criteria and then display it in the chos…
<?php
/**
* @file
*
* Note that there is no need for a hook_block() to define it. CTools automatically scans all
* of the subdirectories here for *.inc files, and reads the contents of the $plugin array
* defined below to figure out how to use the widget.
*/
$plugin = array(