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
/* | |
This will work on WP 2.7.0 on up on the commonly used get_xxxxxxx_posts_link call. | |
From Google: | |
http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html | |
*/ | |
add_filter('next_posts_link_attributes', create_function('$attr','return $attr.\' rel="next" \';')); | |
add_filter('previous_posts_link_attributes', create_function('$attr','return $attr.\' rel="prev" \';') ); |
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
/* | |
jQuery InViewToo Plugin to add triggers for elements entering/leaving the viewport | |
Not entirely complete, fully featured, or documented...but functional! | |
Fiddle Away! | |
http://jsfiddle.net/dalesaurus/CkFUB/ | |
Inspired by | |
http://www.appelsiini.net/projects/lazyload |
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
/* | |
Use jQuery to load FB Connect javascript asynchronously, then trigger manual parsing of individual XFBML tags | |
*/ | |
window.fbAsyncInit = function() { | |
FB.init({channelUrl:'http://YOUR_SITE_URL.HERE/channel.html',xfbml: false,logging:false,status:false}); | |
}; | |
(function() { | |
jQuery(document).ready(function() { | |
jQuery.getScript('http://connect.facebook.net/en_US/all.js', function(){ | |
var parseXFBML = function() { |
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 | |
/** | |
Echo a list of tags terms for posts that are also have a $where_tax of $where_slug | |
Queries added to transient cache for performance | |
Note: Using the slug for a Taxonomy in $where_slug for simpler query | |
Tested up to WP 3.3, drop it in your functions.php | |
Example: Get a tag list for Posts in the 'News' Category | |
tags_by_other_taxonomy('news'); |
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: Generic Menu | |
Plugin URI: http://example.com/ | |
Description: Move things | |
Author: dalethedeveloper | |
Version: 0.1 | |
*/ | |
new myadmin_generic(); |
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
<!-- | |
For testing how multiple versions of jQuery interact on a page, | |
see http://jsfiddle.net/dalesaurus/5TgkG/ | |
--> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script type="text/javascript">window.jQuery || document.write('<script src="/js/jquery-1.7.1.min.js"><\/script>')</script></script> | |
<script type="text/javascript"> | |
var jQuery171 = window.jQuery; | |
jQuery171(document).ready(function($){ | |
// Do work, son! |
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
/** | |
Get all terms in a Taxonomy including associated posts | |
Like get_objects_in_term() for all terms or get_terms() that includes posts | |
@$tax string Taxonomy to fetch (Default "post_tag", must be a slug) | |
@$post_type string Post type to use (Default "post") | |
@$query_args string Additional Query Args to use when querying objects (Default: '', must be string form, eg 'order=ASC&post_status=published') | |
@$return_ids bool Return just Post IDs in $return->posts instead of complete post Objects (Default: false) | |
*/ | |
function get_objects_in_taxonomy($tax = 'post_tag', $post_type = 'post', $query_args = '', $return_ids = false ) { |
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
<!-- http://tinkerbin.com/jkItQEwh --> | |
<a href="https://www.facebook.com/events/331218348435" class="fb_rsvp" target="_blank" title="RSVP on Facebook">RSVP</a> | |
<style type="text/css"> | |
a.fb_rsvp { | |
background: #ECEEF5 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAASCAYAAADLw4ffAAAAAXNSR0IArs4c6QAAA0ZJREFUSA3VVXtIk1EU/21q6h665ZypU9SgtEwt0hL6JyICiQgRiwgKCiPor/qjiKiECCIEA+lB2UOMgiyo6GVkLxMniuarfGe6pXNu6l5uPta9V78vc5u5CMwL+75zzj3n3N8953e+CfQGixOLdAkXKW4Ge1GD952r8rVftGhq00FnMOPo/k1zuS7InkfwLV16FNyt5EFRfWWsgtf/B0HgaWAPnHrkgq/wXKaLbaZhYmISjW39vEkq9kdMpBxCoYC3aXUj6NObEB+nhCjAj9m7tUMIkvhDHhTI+/X2DSOQ7FN7c7tuyk7SRIfLeL9/ynm7YxzXS6rR1j3IfmXqTpzML4XJYmeHXyqqwOuKdgLejPw7n1D5uYfZO74P4sWHVh44FW6QPDb7GKy2MRQ+nMrZSrp/5Z4axU/rmK9H2vyWyQtFIlqCrG2JfETxkzpUN2qwIkYBx9g49u1cx/bSU6Lx4GUDNiZHIXWNCrmXy7A7I4l1STdoxuSkE6qwYAybRkE7yOUcJ909kfcKmVtX468qTynljlY84mnBbHXgB6FIhFIKWVAANDoTq/CAwcJan5OdxjwpuKhlwfjaNcD0miYt0pJUs9MxnVKOLn8/H3isPOU3B1AmDUDe8QwW9KeHYdiKMwVvmJtx2Ia4KDmrukAgwOnDm0GpdPW+GqOEYrSaaxMimG96cjTU9T1YtVyJmiYNcrJT |
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
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-22762790-1']); | |
// DELAY _gaq.push(['_trackPageview']); | |
(function () { | |
var ga = document.createElement('script'); | |
ga.type = 'text/javascript'; | |
ga.async = true; | |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[0]; |
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 rollback_jquery() { | |
wp_deregister_script('jquery'); | |
wp_enqueue_script('jquery-1.7.2','http://code.jquery.com/jquery-1.7.2.min.js'); | |
} | |
add_action('wp_enqueue_scripts','rollback_jquery',100); |