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
// the upload image button, saves the id and outputs a preview of the image | |
$('.meta_box_upload_image_button').click(function() { | |
formID = $(this).attr('rel'); | |
formfield = $(this).siblings('.meta_box_upload_image'); | |
preview = $(this).siblings('.meta_box_preview_image'); | |
tb_show('Choose Image', 'media-upload.php?post_id='+formID+'&type=image&custom=simple&TB_iframe=1'); | |
window.orig_send_to_editor = window.send_to_editor; | |
window.send_to_editor = function(html) { | |
img = $('img',html); | |
imgurl = img.attr('src'); |
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
<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>Zooming Japan » Blog</title> <atom:link href="http://zoomingjapan.com/blog/feed/" rel="self" type="application/rss+xml" /><link>http://zoomingjapan.com</link> <description></description> <lastBuildDate>Wed, 10 Oct 2012 15:03:55 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Akita: Kakunodate</title><link>http://zoomingjapan.com/travel/akita-kakunodate/</link> <comments>http://zoomingjapan.com/travel/akita-kakunodate/#comments</comments> <pubDate>Wed, 10 Oct 2012 15:03:55 +0000</pubDate> <dc:creator>zoomingjapan</dc:creator> <category><![C |
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 my_init() { | |
add_rewrite_endpoint( 'my_entry', EP_ALL ); | |
add_rewrite_endpoint( 'my_booked', EP_ALL ); | |
add_rewrite_endpoint( 'my_custom_css', EP_ALL ); | |
} | |
/** | |
* Flush rewrite rules on plugin activation. | |
*/ |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); |
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 | |
class regions { | |
static function initialize() | |
{ | |
// We need to process the_content as early as possible, to be sure that DOM tree identical to edited one | |
// Also, function accept 2 arguments, so when needed we can supply exact regions to apply | |
if ( !is_admin() ) { // We don't want to run this on the backend | |
if (true) { // until apply_filter use current()/next() | |
add_filter('the_content', array(self::instance(), 'content_split_join'), -99991, 2); | |
} else { |
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 | |
add_filter( 'the_content', 'my_content_filter' ); | |
/** | |
* Auto appends the content of child posts to the main post | |
*/ | |
function my_content_filter( $content ) { | |
global $post; |
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 | |
/** | |
* Outputs the current weather conditions | |
*/ | |
function ocj_weather() { | |
$conditions = get_transient( 'current_weather' ); | |
if ( false === $conditions ) { | |
$key = '771f294942a9ba11'; | |
$current = 'http://api.wunderground.com/api/' . $key . '/conditions/q/OH/Columbus.json'; |
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 | |
/** | |
* header.php | |
*/ | |
?><!DOCTYPE html> | |
<html <?php language_attributes(); ?>> | |
<head> | |
<!-- meta tags and such omitted for brevity --> |
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 (window, $, thirdyo ) ) { | |
var mycallbackfunction = function() {} | |
thirdyo.thirdpartyfunction( mycallbackfunction ); | |
})(window, jQuery, thirdyo ); |
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( window, undefined ) { | |
var Logger = function() { | |
var SELF = this, | |
log = []; | |
SELF.append = function( data ) { | |
log.push( data ); | |
}; | |
SELF.getData = function() { |