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
<article> | |
<header>Article Header</header> | |
<center> | |
<p>Once upon a time...</p> | |
<ul></ul> | |
</center> | |
<footer>Article Footer</footer> | |
</article> |
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
<script>$('.folded dt').click( function() { $(this).toggleClass('unfolded').next('dd').toggleClass('unfolded'); });</script> | |
<style> | |
.folded dt, | |
.folded dd { | |
display: block; | |
} | |
.folded dt { |
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 prune_page_templates( $templates ) { | |
unset( $templates['templates/halves.php'] ); | |
unset( $templates['templates/margin-left.php'] ); | |
unset( $templates['templates/margin-right.php'] ); | |
unset( $templates['templates/side-left.php'] ); | |
unset( $templates['templates/side-right.php'] ); | |
unset( $templates['templates/single.php'] ); | |
return $templates; | |
} | |
add_filter( 'theme_page_templates', 'prune_page_templates' ); |
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( $ ){ | |
process_section_backgrounds = function() { | |
var $bg_sections = $('.section-wrapper-has-background'); | |
$bg_sections.each( function() { | |
var background_image = $(this).data('background'); | |
$(this).css('background-image', 'url(' + background_image + ')' ); | |
}); | |
}; |
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() ) { |
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
<?php | |
$url = "http://example.com/email.html"; | |
if ( $_GET["url"] != "" ) { $url = $_GET["url"]; } | |
// Determine Recipients | |
$recipients = $_GET["to"]; | |
$to = "[email protected]"; | |
// Desktop Clients | |
if ($recipients == "mail") { $to = "[email protected]"; } // 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
<?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
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"; |
NewerOlder