This file contains hidden or 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 | |
| // Initial sanity check | |
| if (! defined('ABSPATH')) | |
| die('Please do not directly access this file'); | |
| // Bring in the main functions file so we have access to all the yummy Thesis goodness | |
| include_once(TEMPLATEPATH . '/functions.php'); | |
| class thesis_responsive_child_theme extends thesis_custom_loop { |
This file contains hidden or 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 | |
| // deny direct access | |
| if (! defined('ABSPATH')) | |
| die('Please do not directly access this file'); | |
| class thesis_skin_example extends thesis_custom_loop { | |
| public function __construct() { | |
| parent::__construct(); // this "activates" the Custom Loop API | |
| add_action('init', array($this, 'init')); | |
| } |
This file contains hidden or 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 | |
| $args=array('showposts'=>5,'caller_get_posts'=>1); | |
| $my_query = new WP_Query($args); | |
| if( $my_query->have_posts() ) { | |
| while ($my_query->have_posts()) : $my_query->the_post(); ?> | |
| <h2> | |
| <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a> | |
| <?php if (get_comments_number()==0) { } else { ?> | |
| <a href="<?php the_permalink(); ?>#comments"><?php comments_number( '', '1 Comment', '% Comments' ) ?></a> | |
| <?php } ?> |
This file contains hidden or 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 | |
| foreach( get_categories('hide_empty=1','order_by=name') as $cat ) : | |
| if( !$cat->parent ) { | |
| echo '<h2><a href="#">' . $cat->name . '</a></h2>'; | |
| echo '<ul>'; | |
| process_cat_tree( $cat->term_id ); | |
| } | |
| endforeach; | |
| wp_reset_query(); //to reset all trouble done to the original query |
This file contains hidden or 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 replace_comments_intro($content, $number) { | |
| $content = "Comment & Add Your Voice\n"; | |
| return $content; | |
| } | |
| add_filter('thesis_comments_intro', 'replace_comments_intro'); |
This file contains hidden or 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)})}}); | |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 ); |