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 | |
// Output a snapshot of any website! | |
function wp_snap($atts, $content = NULL) { | |
extract(shortcode_atts(array( | |
"snap" => 'http://s.wordpress.com/mshots/v1/', | |
"url" => 'http://wpspeak.com/', | |
"alt" => 'WPSpeak', | |
"w" => '600', // width |
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 | |
// Modify the size of the Gravatar in the author box | |
add_filter( 'genesis_author_box_gravatar_size', 'new_author_box_gravatar_size' ); | |
function new_author_box_gravatar_size( $size ) { | |
return '96'; | |
} |
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 | |
// Modify the size of the Gravatar in the entry comments | |
add_filter( 'genesis_comment_list_args', 'custom_comments_gravatar' ); | |
function custom_comments_gravatar( $args ) { | |
$args['avatar_size'] = 96; | |
return $args; | |
} |
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
/* Same as other file, but with extra notes */ | |
/* Embedded Gists */ | |
.line-pre::before, | |
.line-pre::after, | |
.line::before, | |
.line::after { | |
content: ''; /* Fixes addition of float-clearing space added to before and after global pre and div elements */ | |
} |
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 | |
// Anti Spam Mailto Links | |
function email_encode_function($atts, $content){ | |
return '<a href="'.antispambot($content).'">'.antispambot($content).'</a>'; | |
} | |
add_shortcode('email', 'email_encode_function'); |
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 | |
// Link post title to external link | |
function afn_link_filter($link, $post) { | |
if (has_post_format('link', $post) && get_post_meta($post->ID, 'LinkFormatURL', true)) { | |
$link = get_post_meta($post->ID, 'LinkFormatURL', true); | |
} | |
return $link; | |
} |
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 | |
// Add support for post formats | |
add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video') ); |
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 | |
// Add support for post format images (for Genesis Framework only) | |
add_theme_support( 'genesis-post-format-images' ); |
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
// Classes For Post Formats | |
.format-aside | |
.format-audio | |
.format-chat | |
.format-gallery | |
.format-image | |
.format-link | |
.format-quote | |
.format-status |
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 | |
/** | |
* Exclude Post Formats from Blog | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/customize-the-wordpress-query/ | |
* @param object $query data | |
* | |
*/ |