This file contains hidden or 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 | |
| /** | |
| * API Request Caching | |
| * | |
| * Use server-side caching to store API request's as JSON at a set | |
| * interval, rather than each pageload. | |
| * | |
| * @arg Argument description and usage info | |
| */ | 
  
    
      This file contains hidden or 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 cache_image($image_url){ | |
| //replace with your cache directory | |
| $image_path = 'path/to/cache/dir/'; | |
| //get the name of the file | |
| $exploded_image_url = explode("/",$image_url); | |
| $image_filename = end($exploded_image_url); | |
| $exploded_image_filename = explode(".",$image_filename); | |
| $extension = end($exploded_image_filename); | |
| //make sure its an image | 
  
    
      This file contains hidden or 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 crawl_page($url, $depth = 5) | |
| { | |
| static $seen = array(); | |
| if (isset($seen[$url]) || $depth === 0) { | |
| return; | |
| } | |
| $seen[$url] = true; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | 301 moved permanently (redirect): | |
| <?php | |
| header('HTTP/1.1 301 Moved Permanently'); | |
| header('Location: http://www.example.com'); | |
| die(); | |
| ?> | |
| 302 moved temporarily(redirect): | |
| <?php | |
| header('Location: http://www.example.com'); | 
  
    
      This file contains hidden or 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 | |
| /* Detects some common web bots */ | |
| function detectBot($USER_AGENT) { | |
| $crawlers_agents = strtolower('Bloglines subscriber|Dumbot|Sosoimagespider|QihooBot|FAST-WebCrawler|Superdownloads Spiderman|LinkWalker|msnbot|ASPSeek|WebAlta Crawler|Lycos|FeedFetcher-Google|Yahoo|YoudaoBot|AdsBot-Google|Googlebot|Scooter|Gigabot|Charlotte|eStyle|AcioRobot|GeonaBot|msnbot-media|Baidu|CocoCrawler|Google|Charlotte t|Yahoo! Slurp China|Sogou web spider|YodaoBot|MSRBOT|AbachoBOT|Sogou head spider|AltaVista|IDBot|Sosospider|Yahoo! Slurp|Java VM|DotBot|LiteFinder|Yeti|Rambler|Scrubby|Baiduspider|accoona'); | |
| $crawlers = explode("|", $crawlers_agents); | |
| if(is_array($crawlers) { | |
| foreach($crawlers as $crawler) { | |
| if (strpos(strtolower($USER_AGENT), trim($crawler)) !== false) { | |
| return true; | |
| } | 
  
    
      This file contains hidden or 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: Hook Debug Output | |
| * Plugin URI: http://unserkaiser.com | |
| * Description: Debug Hooked filter callback functions with adding <code>?debug=secret&hook=your_hook_name</code> to the URl | |
| * Version: 0.1 | |
| * Author: Stephen Harris, Franz Josef Kaiser | |
| * Author URI: http://unserkaiser.com | |
| */ | |
| // Prevent loading this file directly - Busted! | 
  
    
      This file contains hidden or 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
    
  
  
    
  | $(document).ready(function() { | |
| /* Hide all elements outside the visible window */ | |
| $('body *').each( function(){ | |
| var top_of_object = $(this).position().top; | |
| var bottom_of_window = $(window).scrollTop() + $(window).height(); | |
| if( bottom_of_window < top_of_object ){ | |
  
    
      This file contains hidden or 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 # -*- coding: utf-8 -*- | |
| declare ( encoding = 'UTF-8' ); | |
| /** | |
| * Plugin Name: T5 All URIs | |
| * Description: Creates a plaintext list of all URIs on your blog. | |
| * Version: 2012.03.08 | |
| * Required: 3.3 | |
| * Author: Thomas Scholz <[email protected]> | |
| * Author URI: http://toscho.de | |
| * License: MIT | 
  
    
      This file contains hidden or 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 | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.com | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
| * Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
| */ | |
| $args = array( | 
  
    
      This file contains hidden or 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 | |
| /* | |
| Setup and add our custom post types | |
| */ | |
| function create_post_types(){ | |