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
<?php | |
/** | |
* Recent_Comments_EF widget class | |
* | |
* Patched for Edit Flow | |
* | |
* @since 2.8.0 | |
*/ | |
class WP_Widget_Recent_Comments_EF extends WP_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
/// <summary> | |
/// Cleans up a given string into a slug-friendly form. | |
/// Strips special characters and replaces spaces with hyphens. | |
/// | |
/// Given something like "The Quick Fox Don't Like No Guff!" return "The-Quick-Fox-Dont-Like-No-Guff" | |
/// | |
/// Borrowed from WordPress. | |
/// </summary> | |
/// <param name="str">The string to be sanitized</param> | |
/// <returns>A sanitized string</returns> |
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
// Redefines jQuery.fn.html() to add custom events that are triggered before and after a DOM element's innerHtml is changed | |
// html-change-pre is triggered before the innerHtml is changed | |
// html-change-post is triggered after the innerHtml is changed | |
; | |
(function($) { | |
var eventName = 'html-change'; | |
// Save a reference to the original html function | |
jQuery.fn.originalHtml = jQuery.fn.html; | |
// Let's redefine the html function to include a custom event | |
jQuery.fn.html = function() { |