Skip to content

Instantly share code, notes, and snippets.

View whyisjake's full-sized avatar
✈️

Jake Spurlock whyisjake

✈️
View GitHub Profile
@whyisjake
whyisjake / functions.php
Created May 31, 2013 23:31
Looking for a way to filter posts out of the main loop in the admin if they have a certain taxonomy term associated with them.
<?php
/**
* Hide Maker Faire applications from past faires
*
* In the past, CS had a method for only selecting the current
* faire for applications. We want to do the same here, and prevent
* all applications from showing up in the edit screen.
*
* @global $query
*
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'makerfaire'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
654896 Center Stage
921378 Racetrack
27475665 Pedal Powered Stage
36578739 Life-Size Mousetrap
129846826 Drone Games
156780557 Battle Pond
164745398 Make: Education Stage
164745444 Make: Electronics Stage
164745603 Maker Shed Stage
164940502 Meet the Makers Stage
<select name="location" id="location" class="postform">
<option value="0" selected="selected">View All Locations</option>
<option class="level-0" value="654896">Center Stage</option>
<option class="level-0" value="921378">Racetrack</option>
<option class="level-0" value="27475665">Pedal Powered Stage</option>
<option class="level-0" value="36578739">Life-Size Mousetrap</option>
<option class="level-0" value="129846826">Drone Games</option>
<option class="level-0" value="156780557">Battle Pond</option>
<option class="level-0" value="164745398">Make: Education Stage</option>
<option class="level-0" value="164745444">Make: Electronics Stage</option>
<?php
WP_CLI::add_command( 'makerfaire', 'MAKE_CLI' );
class MAKE_CLI extends WP_CLI_Command {
/**
* Add tags and cats to posts.
* Read the category and tag out of the JSON array, and then assign to the post.
*
* @subcommand cats
<?php
WP_CLI::add_command( 'makerfaire', 'MAKE_CLI' );
class MAKE_CLI extends WP_CLI_Command {
/**
* Add tags and cats to posts.
* Read the category and tag out of the JSON array, and then assign to the post.
*
* @subcommand cats
<?php
WP_CLI::add_command( 'makerfaire', 'MAKE_CLI' );
class MAKE_CLI extends WP_CLI_Command {
/**
* Add tags and cats to posts.
* Read the category and tag out of the JSON array, and then assign to the post.
*
* @subcommand cats
<?php
WP_CLI::add_command( 'makerfaire', 'MAKE_CLI' );
class MAKE_CLI extends WP_CLI_Command {
/**
* Add tags and cats to posts.
* Read the category and tag out of the JSON array, and then assign to the post.
*
* @subcommand cats

Hi Jake and Amy

I know you must be super busy getting ready for Makerfaire but thought I would let you know about a couple of classes we’re offering, please also feel free to share with anyone else who is looking to improve their skills, we’re doing another video shoot on two courses the week of May 13. See the details below.

  • Emma

O'Reilly Media in Sebastopol is looking for students to come sit in our studio while we film a video to resell on oreilly.com. We're filming two courses: HTML5 Canvas and HTML5 2D May 13-May 17.

Email [email protected] to sign up or for more details.

<?php
add_action( 'init', 'mf_allow_data_atts' );
function mf_allow_data_atts() {
global $allowedposttags;
$tags = array( 'div,a,li' );
$new_attributes = array( 'data' => array() );
foreach ( $tags as $tag ) {
if ( isset( $allowedposttags[ $tag ] ) && is_array( $allowedposttags[ $tag ] ) )