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 $spine_color = get_option( 'spine_theme_options' ); echo $spine_color['grid_style']; ?> |
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
/** | |
* Repeatable Custom Fields in a Metabox | |
* Author: Helen Hou-Sandi | |
* Mucker: Nate Jacobson | |
* | |
* Note that this particular metadata is saved as one multidimensional array (serialized) | |
*/ | |
function get_column_options() { | |
$column_options = 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
$(document).ready(function(){ | |
function equalizing() { | |
if( $('.equalize').length ) { | |
$('.row.equalize .column').css('min-height',''); | |
$('.row.equalize').each(function(){ | |
var tallestBox = 0; | |
$('.column', this).each(function(){ | |
if($(this).height() > tallestBox) { | |
tallestBox = $(this).outerHeight(); |
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($){ | |
function display_posts( data ) { | |
var results = data; | |
var i = 0; | |
$.each( results, function( index, value ) { | |
if(index<3){ | |
console.log( value ); // Use this to see what object properties are available, like date, content, etc... | |
var html = ''; | |
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 ($) { | |
'use strict'; | |
function display_posts(feed, slug, element, title, count) { | |
if (element == 'main') { | |
$('main').append( | |
'<section class="row margin-right gutter feed json shortcode">' | |
+ '<div id="' + slug + '" class="column one ' + slug + '">' | |
+ '<h2>' + title + '</h2>' | |
+ '</div>' |
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 spine_excerpt_style_classes( $classes ) { | |
global $post; | |
if ( !is_singular() ) { | |
if ( $post->post_excerpt ) { | |
$classes[] = "summary-excerpted"; | |
} elseif ( strstr( $post->post_content, '<!--more-->' ) ) { | |
$classes[] = "summary-divided"; | |
} elseif ( 'excerpt' === spine_get_option( 'archive_content_display' ) ) { | |
$classes[] = "summary-truncated"; |
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 | |
header("Content-Type: text/html; charset=utf-8"); | |
function get_url_element_contents($url){ | |
$crl = curl_init(); | |
$timeout = 5; | |
curl_setopt ($crl, CURLOPT_URL,$url); | |
curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout); | |
$ret = curl_exec($crl); | |
curl_close($crl); |
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 | |
$url = "http://example.com/email.html"; | |
if ( $_GET["url"] != "" ) { $url = $_GET["url"]; } | |
// Determine Recipients | |
$recipients = $_GET["to"]; | |
$to = "default.recipient@example.com"; | |
// Desktop Clients | |
if ($recipients == "mail") { $to = "mail.user@example.com"; } // Apple Mail (Gold Standard) |
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 imageWrap() { | |
$("article img").each( function() { | |
var img_classes = $(this).attr("class"); | |
var img_src = $(this).attr("src"); | |
if ( !$(this).parent().is("figure") ) { | |
$(this).unwrap("p").wrap('<figure class="figure-auto figure-back '+img_classes+'" style="background-image: url(\''+img_src+'\')"></figure>'); |
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
// Assign to body on single pages and to each article in lists | |
add_filter( 'body_class', 'post_freshness_class' ); | |
add_filter( 'post_class', 'post_freshness_class' ); | |
function post_freshness_class( $classes ) { | |
$interval = ( current_time( 'Ymd', $gmt = 0 ) - get_the_date('Ymd') ); | |
$interval_month = ( current_time( 'Ym', $gmt = 0 ) - get_the_date('Ym') ); | |
if ( !is_page() ) { |
OlderNewer