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 src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script> | |
<script type="text/javascript">FB.init("INSERT-YOUR-API-KEY");</script> | |
<fb:fan profile_id="INSERT-YOUR-PAGE-ID" connections="10" width="300" height="210" css="http://yoursite.com/path-to-your-stylesheet/style.css?5"></fb:fan> |
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
/** | |
* Simple Twitter status getter. | |
* @param string $handle User Twitter handle | |
* @param integer $count Desired number of tweets | |
* @return array Indexed array of tweets | |
*/ | |
function dev_get_twitter_timeline($handle, $count = 3) { | |
// WP template tag | |
$save = get_stylesheet_directory() . '/assets/twitter.json'; | |
$time = time(); |
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 quotes to an element. | |
// | |
// Parameters: | |
// | |
// * [optional] `size` -- Size, in em of the quotes | |
// * [optional] `padding` -- Top-left padding on lefthand quote | |
// * [optional] `left` -- Left quote glyph | |
// * [optional] `right` -- Right quote glyph | |
@mixin my-quotes($size: 1.3em, $padding:false, $left:'\201C', $right:'\201D') { | |
&:after, &:before { font-size: $size; } |
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
#!/bin/bash | |
## v1.0.6 | |
## this script will gernerate css stats | |
### example output | |
# CSS STATS | |
# ---------- | |
# Floats: 132 |
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
@import "compass/css3"; | |
// Add outward pointing arrows (triangles) to the sides of a box that has borders. (CSS triangles obviously | |
// based on Chris Coyier's CSS triangle. http://css-tricks.com/snippets/css/css-triangle.) | |
// | |
// Parameters: | |
// | |
// * `direction` -- What side of the box and direction of the arrow | |
// * `flatten` -- An *even numbered* factor of flattening the triangle (MUST be a even number) | |
// * `arrowBaseLength` -- Width or height of the arrow's base |
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 is_blog () { | |
global $post; | |
$posttype = get_post_type($post ); | |
return ( ((is_archive()) || (is_author()) || (is_category()) || (is_home()) || (is_single()) || (is_tag())) && ( $posttype == 'post') ) ? true : false ; | |
} | |
Usage: | |
<?php if (is_blog()) { echo 'You are on a blog 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
<?php | |
function my_attachments( $attachments ) | |
{ | |
$args = array( | |
// title of the meta box (string) | |
'label' => 'My Attachments', | |
// all post types to utilize (string|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
<?php $attachments = new Attachments( 'attachments' ); ?> | |
<?php if( $attachments->exist() ) : ?> | |
<h3>Attachments</h3> | |
<ul> | |
<?php while( $attachments->get() ) : ?> | |
<li> | |
ID: <?php echo $attachments->id(); ?><br /> | |
Type: <?php echo $attachments->type(); ?><br /> | |
Subtype: <?php echo $attachments->subtype(); ?><br /> | |
URL: <?php echo $attachments->url(); ?><br /> |
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 $testimonials = new WP_Query('post_type=testimonial'.ks_query('testimonials')); ?> | |
<div class="testimonials"> | |
<?php while( $testimonials->have_posts() ): $testimonials->the_post(); ?> | |
<blockquote class="testimonial"> | |
<?php the_content(); ?> | |
<footer> | |
<p> | |
<?php the_title(); ?> | |
</p> |
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
module Sass::Script::Functions | |
def file_exists(image_file) | |
path = Dir.getwd + "/" + image_file.value | |
Sass::Script::Bool.new(File.exists?(path)) | |
end | |
end |
OlderNewer