Skip to content

Instantly share code, notes, and snippets.

View mattkelley's full-sized avatar

Matt mattkelley

  • Austin, TX
  • 06:34 (UTC -05:00)
View GitHub Profile
@mattkelley
mattkelley / atomic_action_hooks.php
Created April 16, 2013 22:01
Atomic action hooks
<?php do_atomic( 'before_header' ); // firewood_before_header ?>
@mattkelley
mattkelley / firewood_entry_class.php
Created April 16, 2013 22:09
Dynamic entry classes
add_action( 'after_setup_theme', 'firewood_entry_class' );
/**
* Provides classes for the post contianer based on context.
*
* @since 1.0
* @credit Original script hybrid_entry_class via Hybrid Core 1.3.1
*/
function firewood_entry_class( $class = '', $post_id = null ) {
static $post_alt;
@mattkelley
mattkelley / firewood_entry_header.php
Created April 16, 2013 22:10
Firewood entry header
add_action( "{$prefix}_open_entry", 'firewood_entry_header' );
/**
* Default entry header for posts.
*
* @since 1.0
*/
function firewood_entry_header() {
@mattkelley
mattkelley / firewood_entry_meta.php
Created April 16, 2013 22:11
Firewood entry meta
add_action( "{$prefix}_close_entry", 'firewood_entry_meta' );
/**
* Displays the default entry metadata.
*
* @since 1.0
*/
function firewood_entry_meta() {
$entry_meta = '';
@mattkelley
mattkelley / deregister_jquery_scripts.php
Created April 16, 2013 22:12
Deregister jquery scripts
/* Deregister WordPress jQuery on the frontend */
add_action( 'wp_enqueue_scripts', 'firewood_remove_jquery' );
/**
* Deregister WordPress jQuery, Google hosted jQuery is added manually with a local fallback.
*
* @since 1.0
*/
@mattkelley
mattkelley / get_template_part.php
Created April 16, 2013 22:13
get_template_part do_action example
/* Add post navigation links */
add_action( "{$prefix}_close_content", 'firewood_loop_nav' );
/**
* Loads the loop-nav.php template.
*
* @since 1.0
*/
function firewood_loop_nav() {
@mattkelley
mattkelley / loop-nav.php
Created April 16, 2013 22:19
Firewood 1.3.1 loop-nav.php remove from Firewood 2.0
<?php
/*
* The loop navigation template part
*
* @since 1.0
* @package firewood
* @subpackage Part
*/
?>
@mattkelley
mattkelley / loop-error.php
Created April 16, 2013 22:19
Firewood 1.3.1 loop-error.php remove from Firewood 2.0
<?php
/*
* The loop error template part
*
* @since 1.0
* @package firewood
* @subpackage Loop Part
*/
?>
<div class="<?php firewood_entry_class(); ?>">
@mattkelley
mattkelley / habilis_footer.php
Created April 17, 2013 06:26
Footer scripts in habilis
@mattkelley
mattkelley / search-form.php
Created May 5, 2013 23:27
Search form template
<?php
/*
* The searchform template
*
* @since 1.0
* @package firewood
* @subpackage Template
*/
?>