This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//=========================================================== Custom Meta Box - Video | |
$prefix = 'matterful_optionbox_'; | |
$meta_box = array( | |
'id' => 'matterful_optionbox', | |
'title' => 'Ice Brimmin’ Options', | |
'page' => 'post', | |
'context' => 'normal', | |
'priority' => 'high', | |
'fields' => array( | |
array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function gist_shortcode($atts, $content = NULL) { | |
extract( shortcode_atts( array( | |
'id' => '', | |
'title' => '' | |
), $atts ) ); | |
if (empty ($id) ) | |
return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Course Information | |
================== | |
Course Name: | |
------------ | |
Description: | |
------------ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul class="none"> | |
<?php $lessons_query = new WP_Query( array('post_type' => 'lesson', 'cat' => 21,'orderby' => date, 'order' => DESC, 'posts_per_page' => 5)); | |
while ( $lessons_query->have_posts() ) : $lessons_query->the_post(); ?> | |
<li> | |
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> | |
</li> | |
<?php endwhile; wp_reset_postdata(); ?> | |
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//=========================================================== SIDEBAR == Similar Posts | |
function similar_posts() { | |
echo "<li class=\"widget similar_posts\">"; | |
echo "<h3>Similar Posts</h3>"; | |
echo "<ul>"; | |
global $post; | |
//stores the original post data | |
$original_post = $post; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//========================================================== CUSTOM MENU WALKER - remove list stuff, only links | |
class custom_menu_walker_remove_list extends Walker_Nav_Menu { | |
function start_el(&$output, $item, $depth, $args) { | |
global $wp_query; | |
$class_names = $value = ''; | |
$classes = empty( $item->classes ) ? array() : (array) $item->classes; | |
$classes[] = 'menu-item-' . $item->ID; | |
$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) ); | |
$class_names = ' class="' . esc_attr( $class_names ) . '"'; | |
$id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
$KCODE = 'U' | |
$char_to_entity = { } | |
File.open("#{ENV['TM_BUNDLE_SUPPORT']}/entities.txt").read.scan(/^(\d+)\t(.+)$/) do |key, value| | |
$char_to_entity[[key.to_i].pack('U')] = value | |
end | |
def encode (text) | |
text.gsub(/[^\x00-\x7F]|["'<>&]/) do |ch| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p class="menu-main-menu-container"> | |
<?php wp_nav_menu( array( 'menu' => 'Main Menu','container' => false,'items_wrap' => '%3$s','walker' => new no_list_custom_nav_walker() ) ); ?> | |
</p> | |
class no_list_custom_nav_walker extends Walker { | |
var $tree_type = array( 'post_type', 'taxonomy', 'custom' ); | |
var $db_fields = array( 'parent' => 'menu_item_parent', 'id' => 'db_id' ); | |
function start_lvl(&$output, $depth) { | |
$indent = str_repeat("\t", $depth); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title><img src="Matterful"></title> | |
<meta name="generator" content="TextMate http://macromates.com/"> | |
<meta name="author" content="Chase Reeves"> | |
<!-- Date: 2012-04-04 --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// == ## ========================================================== Replace placeholder in older browsers | |
jQuery(function(){jQuery.support.placeholder=false;test=document.createElement("input");if("placeholder" in test){jQuery.support.placeholder=true}});$(function(){if(!$.support.placeholder){$("input[placeholder]").each(function(){var val=$(this).attr("placeholder");$(this).attr("value",val)})}}); | |