Skip to content

Instantly share code, notes, and snippets.

View sbruner's full-sized avatar

Steve Bruner sbruner

View GitHub Profile
@sbruner
sbruner / gist:2e0e73d32af50db76d6218ba6946d599
Created May 12, 2016 01:35 — forked from m/gist:bab8d366d2e826ba2311
freedom zero mark pilgrim text
Movable Type has never been Free Software, as defined by the Free Software
Foundation. It has never been open source software, as defined by the Open
Source Initiative. Six Apart survived and thrived in the blogging community
because Movable Type was “free enough.”
Many people misunderstand
Free Software and the GNU General Public License. Many people equate the GPL to
the boogeyman, because it’s “viral”, and that sounds like a bad thing.
@sbruner
sbruner / gist:d1f7c5a04533f63d2cf1
Last active September 3, 2015 01:35 — forked from mannieschumpert/gist:8886289
Code Examples from Andrew Nacin's "Current User Can Watch This Talk"
<?php
// If you can edit pages, you can edit widgets
add_filter( 'user_has_cap',
function( $caps ) {
if ( ! empty( $caps['edit_pages'] ) )
$caps['edit_theme_options'] = true;
return $caps;
} );
<?php
function parse_piklist_array($array) {
if ( empty($array) )
return array();
$keys = array_keys($array);
if ( empty($keys) )
return array();
$results = $values = array();