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 wpe_noRedirectUrl($srcURL) | |
| { | |
| if (class_exists('WpeCommon')) { | |
| global $wpe_netdna_domains; | |
| static $cdn_domain; | |
| if (!isset($cdn_domain)) { | |
| $wpe_common = new WpeCommon(); | |
| if ($wpe_common->is_cdn_enabled()) { |
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 to get a blog/site's domain mapped url. | |
| // | |
| // You need to call it with a blog ID | |
| // | |
| // Example: | |
| // $custom_blog_id = '14'; | |
| // echo get_domain_mapped_url( $custom_blog_id ); | |
| // |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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 | |
| /** | |
| * Returns all img tags in a HTML string with the option to include img tag attributes | |
| * | |
| * @author Joshua Baker | |
| * | |
| * @example $post_images[0]->html = <img src="example.jpg"> | |
| * $post_images[0]->attr->width = 500 | |
| * |
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 | |
| /* | |
| * Virtual Themed Page class | |
| * | |
| * This class implements virtual pages for a plugin. | |
| * | |
| * It is designed to be included then called for each part of the plugin | |
| * that wants virtual pages. | |
| * | |
| * It supports multiple virtual pages and content generation functions. |
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 | |
| /** | |
| * keeps a user always logged in | |
| * don't use this on a production site, ever! | |
| */ | |
| add_action('init', 'auto_login'); | |
| add_action('admin_init', 'auto_login'); | |
| function auto_login() { |
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
| #!/bin/sh | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # Set the colours you can use | |
| black='\033[0;30m' | |
| white='\033[0;37m' | |
| red='\033[0;31m' |
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
| (function( $ ) { | |
| $.fn.photoswipe = function(options){ | |
| var galleries = [], | |
| _options = options; | |
| var init = function($this){ | |
| galleries = []; | |
| $this.each(function(i, gallery){ | |
| galleries.push({ | |
| id: i, |
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
| /* If you've ever had the need to link directly to an open modal window with Bootstrap, here's a quick and easy way to do it: | |
| Make sure your modal has an id: | |
| <div class="modal" id="myModal" ... > | |
| Then stick this bit of Javascript at at the end of your document: | |
| */ | |
| $(document).ready(function() { |