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
// Set the new image sizes | |
if(function_exists( 'add_image_size')){ | |
add_image_size('blog-large', 900, 700, false); | |
} | |
// Tell the media panel to add the new size to the dropbown | |
function custom_image_sizes($sizes) { | |
$addsizes = array( | |
"blog-large" => __("X-Large") | |
); |
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
// Remove the WP version for extra WordPress Secruty | |
function remove_wp_version(){ | |
return ''; | |
} | |
add_filter('the_generator', 'remove_wp_version'); |
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
// Add a class to the last post in a loop | |
function last_post_class($classes){ | |
global $wp_query; | |
if(($wp_query->current_post+1) == $wp_query->post_count) $classes[] = 'last'; | |
return $classes; | |
} | |
add_filter('post_class', 'last_post_class'); |
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
// Anti Spam Mailto Links | |
function email_encode_function($atts, $content){ | |
return '<a href="'.antispambot($content).'">'.antispambot($content).'</a>'; | |
} | |
add_shortcode('email', 'email_encode_function'); | |
// Use shortcode [email][email protected][/email] |
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
<div id="myCarousel" class="carousel slide"> | |
<ol class="carousel-indicators"> | |
<li data-target="#myCarousel" data-slide-to="0" class="active"></li> | |
<li data-target="#myCarousel" data-slide-to="1"></li> | |
<li data-target="#myCarousel" data-slide-to="2"></li> | |
</ol> | |
<div class="carousel-inner"> | |
<div class="item active"> | |
<img src="http://twitter.github.com/bootstrap/assets/img/bootstrap-mdo-sfmoma-01.jpg" alt=""> | |
<div class="carousel-caption"> |
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 | |
/* | |
Plugin Name: Featured Image in Post List | |
Description: This plugin allows you to see the featured image for each post in the Post list. | |
Version: 0.1 | |
License: GPL | |
Author: Chris Rouse | |
Author URI: www.chrisrouse.us | |
*/ |
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
.input-focus(@r, @g, @b) { | |
textarea:focus, | |
input[type="text"]:focus, | |
input[type="password"]:focus, | |
input[type="datetime"]:focus, | |
input[type="datetime-local"]:focus, | |
input[type="date"]:focus, | |
input[type="month"]:focus, | |
input[type="time"]:focus, | |
input[type="week"]:focus, |
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
.circle { | |
border-radius: 50%; | |
width: 100px; | |
height: 100px; | |
line-height:100px; | |
text-align:center; | |
border:1px solid black; | |
/* width and height can be anything, as long as they're equal */ | |
} |
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
.padding-four-values (@padding1: 16; @padding2: 16; @padding3: 16; @padding4: 16;) { | |
@padding1Value: (@padding1 / 10); | |
@padding2Value: (@padding2 / 10); | |
@padding3Value: (@padding3 / 10); | |
@padding4Value: (@padding4 / 10); | |
padding: (@padding1 * 1px) (@padding2 * 1px) (@padding3 * 1px) (@padding4 * 1px); | |
padding: ~"@{padding1Value}rem" ~"@{padding2Value}rem" ~"@{padding3Value}rem" ~"@{padding4Value}rem"; | |
} | |
usage: |
OlderNewer