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 events_get_next_event() { | |
global $wpdb; | |
$events_table = $wpdb->prefix . 'events'; | |
$date_now = current_time('timestamp'); | |
$query = $wpdb->prepare("SELECT * FROM $events_table WHERE thetime > %s ORDER BY thetime ASC LIMIT 1", $date_now); | |
$event = $wpdb->get_row($query); | |
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 style="text-align: center; font-size: 10px"> | |
<img src="http://gleesays.com/quote/" alt="Glee Quote!" /> | |
<br /> | |
<a href="http://gleeksunited.wordpress.com">Powered by Gleeks United</a> | |
</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
/** Disclaimer: this is not my code. I found this on pastebin and wanted to put it somewhere for easy reference. Thank you anonymous CSS god! **/ | |
.selector { | |
/** Word Wrap **/ | |
/** This will wrap really long strings, e.g. URLs, though without hyphenation **/ | |
word-wrap: break-word; /* CSS 3 + IE */ | |
white-space: -moz-pre-wrap; /* FF */ | |
white-space: -o-pre-wrap; /* Opera */ | |
} |
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://gist.github.com/384113.js?file=console-error.js"></script> | |
<noscript><a href="http://gist.github.com/384113#file_console_error.js">View on gist.github.com</a></noscript> |
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 | |
/** | |
* Gets the current global post type if one is set | |
*/ | |
function x_get_current_post_type() { | |
global $post, $typenow, $current_screen; | |
if( $post && $post->post_type ) | |
$post_type = $post->post_type; | |
elseif( $typenow ) |
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 style="text-align: center; font-size: 10px"> | |
<img src="http://digitalize.ca/glee/countdown/countdown.php" alt="Glee Countdown: It's back on September 21, 2010 at 8pm EST!" /> | |
<br /> | |
<a href="http://gleeksunited.wordpress.com" target="_blank">Powered by Gleeks United</a> | |
</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
<div style="text-align: center; font-size: 10px"> | |
<img src="http://digitalize.ca/glee/countdown/countdown-h.php" alt="Glee Countdown: It's back on September 21, 2010 at 8pm EST!" /> | |
<br /> | |
<a href="http://gleeksunited.wordpress.com" target="_blank">Powered by Gleeks United</a> | |
</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
<?php | |
if ( !$comments = wp_cache_get( 'widget_recent_comments', 'widget' ) ) { | |
$comments_count = 5; | |
$comments = $wpdb->get_results("SELECT $wpdb->comments.* FROM $wpdb->comments JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID WHERE comment_approved = '1' AND post_status = 'publish' AND comment_type IN ('comment', '', 'trackback', 'pingback') ORDER BY comment_date_gmt DESC LIMIT $comments_count"); | |
wp_cache_add( 'widget_recent_comments', $comments, 'widget' ); | |
} |
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
<img src="" id="loading" alt="Loading..." /> | |
<a href="#" onclick="showLoading(); return false;">Show Loading</a> | |
| | |
<a href="#" onclick="hideLoading(); return false;">Hide Loading</a> | |
<script> | |
var loadingUrl = 'http://www.example.com/images/loading-{0}.png'); | |
var loading = loadingAnimator('loading', loadingUrl, { states: 12 }); |