Skip to content

Instantly share code, notes, and snippets.

View anointed's full-sized avatar

shawn gaffney anointed

View GitHub Profile
@anointed
anointed / fitvids.txt
Created April 7, 2012 06:37
fitvids issue
<script type="text/javascript" src="http://broadcast.annointed.net/p/101/sp/10100/embedIframeJs/uiconf_id/6709422/partner_id/101"></script>
<object id="kaltura_player_1333780146" name="kaltura_player_1333780146" type="application/x-shockwave-flash" allowFullScreen="true" allowNetworking="all" allowScriptAccess="always" height="333" width="400" bgcolor="#000000" xmlns:dc="http://purl.org/dc/terms/" xmlns:media="http://search.yahoo.com/searchmonkey/media/" rel="media:video" resource="http://broadcast.annointed.net/index.php/kwidget/cache_st/1333780146/wid/_101/uiconf_id/6709422/entry_id/0_lz4avbac" data="http://broadcast.annointed.net/index.php/kwidget/cache_st/1333780146/wid/_101/uiconf_id/6709422/entry_id/0_lz4avbac"><param name="allowFullScreen" value="true" /><param name="allowNetworking" value="all" /><param name="allowScriptAccess" value="always" /><param name="bgcolor" value="#000000" /><param name="flashVars" value="&{FLAVOR}" /><param name="movie" value="http://broadcast.annointed.net/index.php/kwidget
@anointed
anointed / remove-git.txt
Created April 11, 2012 17:46
remove a git submodule
To remove a submodule you need to:
Delete the relevant line from the .gitmodules file.
Delete the relevant section from .git/config.
Run git rm --cached path_to_submodule (no trailing slash).
Commit and delete the now untracked submodule files.
http://stackoverflow.com/questions/1260748/how-do-i-remove-a-git-submodule/1260982#1260982
@anointed
anointed / 1.txt
Created June 15, 2012 19:19
Toadstool/stipe concept attempt
Trying to learn to work with toadstool/stipe grid and module concept. There are 2 concepts that I am trying to get right. I'm hoping to find out if I am doing this right, and if not, what I should be doing to follow this concept properly.
Demo link: http://bit.ly/KrXcGp
Premise: Starting with a single column mobile theme, and switching layout and module layout via media query for larger screens.
1. layout starts single column (no grid) on mobile, then adjusts when >768px
I was not able to use @extend %grid_8_4 within a media query, thus using 2 separate 'grids' in the media query.
**THIS Can't be right, so obviously I am missing a major concept of the grid**
@anointed
anointed / radio.php
Created June 21, 2012 18:42
Radio Image type
Here is an example 'radio image' field type.
Notice that we are giving the user a set number of choices for the sidebar via 'radio buttons', but instead of showing the text next to the radio box, we are showing an image.
This is from http://leemason.github.com/NHP-Theme-Options-Framework/
One other question:
Is there an ability to create a 'group' of repeating fields?
i.e.
group contains field types (text-title, image, description, etc) where I create that block of fields, and that entire block can repeat?
@anointed
anointed / custom-functions.php
Created July 1, 2012 20:10
get current page layout
function tumble_get_current_page_layout() {
// Use default layout for 404 pages
if ( is_404() ) {
return 'default';
}
// Otherwise, determine appropriate layout
$layout = '';
global $post;
@anointed
anointed / custom-field.php
Created July 2, 2012 20:06
More fields kaltura addon
<?php
/*
Plugin Name: More Fields: Kaltura
Description: Adds Kaltura video as a type for the "More Fields" plugin. The plugins "all-in-one-video-pack" and "more-fields" needs to be installed and setup.
Version: 0.1
Author: Jonathan Bigler
*/
/*
Plugin Name: More Fields: Kaltura
Description: Adds Kaltura video as a type for the "More Fields" plugin. The plugins "all-in-one-video-pack" and "more-fields" needs to be installed and setup.
Version: 0.1
Author: Jonathan Bigler
*/
function mf_kaltura_init($types) {
@anointed
anointed / equal.js
Created July 14, 2012 22:16
Equal Height columns only if browser window is wider than 481px
// global variables
var compareWidthColumn, //previous width used for comparison
detectorColumn, //the element used to compare changes
smallScreenColumn, // Size of maximum width of single column media query
jQuery(document).ready(function($) {
//set the initial values
detectorColumn = jQuery('.js');
compareWidthColumn = detectorColumn.width();
smallScreenColumn = '481';
@anointed
anointed / finished.php
Created July 16, 2012 04:01
Filter to apply a div before menu output
Here is what I ended up going with. Not the way I wanted to do it, but hell it works...
<?
function tumble_menu( $args = array() ) {
/* Default arguments */
$defaults = array(
'container' => 'ul',
'menu_class' => 'nav',
'menu_id' => 'main_menu',
'theme_location' => 'main-menu',
'echo' => true,
@anointed
anointed / concept.php
Created July 17, 2012 06:38
possible bug with wp_nav_menu()
This function is a proof of concept to show that the add_filter() is indeed able to work
and display the 'hello world' div above the opening ul.
<?php
function pippin_sample_html() {
ob_start(); ?>
<ul>
<li>List Item <em>One</em></li>
<li>List <strong>Item</strong> Two</li>
<li>List Item <a href="#">Three</a></li>
</ul>