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 | |
require_once(dirname(__FILE__).'/src/facebook.php'); // facebook SDK for php | |
define("TOKEN", "YOUR ACCESS TOKEN"); | |
define("API", "http://twitter.com/statuses/user_timeline/%s.json"); | |
define("LINK_URL", "http://twitter.com/#!/%s/status/%s"); | |
$facebook = new Facebook(array( | |
'appId' => 'YOUR APP ID', |
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: oEmbed gist | |
Plugin URI: http://firegoby.theta.ne.jp/wp/oembed-gist | |
Description: Embed source from gist.github. | |
Author: Takayuki Miyauchi (THETA NETWORKS Co,.Ltd) | |
Version: 0.1.0 | |
Author URI: http://firegoby.theta.ne.jp/ | |
*/ |
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 type="text/javascript" | |
src="http://connect.facebook.net/en_US/all.js"></script> | |
<script type="text/JavaScript"> | |
FB.init({ | |
appId: 'Your App ID', // edit it | |
status: true, | |
cookie: true, | |
xfbml: true, | |
logging: true | |
}); |
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 | |
/* | |
以下はどちらの方法が良いのでしょう? | |
add_action()を条件式の中に入れるべき? 関数の中に条件式を入れるべき? | |
*/ | |
/* 書くのがちょっとだけ楽 */ | |
if (is_home()) { |
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: Facebook Linter | |
Author: Takayuki Miyauchi | |
Description: update cache on facebook of your post | |
*/ | |
new FBLinter(); | |
class FBLinter { |
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: Disable Quick Cache with WPtouch | |
Author: Takayuki Miyauchi | |
*/ | |
add_filter('theme_root', 'disable_quick_cache', 9999); | |
function disable_quick_cache($path){ | |
if (preg_match("/plugins\/wptouch/", $path)) { |
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: Hook Suffix Console | |
*/ | |
add_action("admin_head", 'suffix2console'); | |
function suffix2console() { | |
global $hook_suffix; | |
if (is_user_logged_in()) { | |
$str = "<script type=\"text/javascript\">console.log('%s')</script>"; |
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 | |
function admin_head_editor() | |
{ | |
wp_enqueue_script('common'); | |
wp_enqueue_script('jquery-color'); | |
wp_print_scripts('editor'); | |
if (function_exists('add_thickbox')) add_thickbox(); | |
wp_print_scripts('media-upload'); | |
if (function_exists('wp_tiny_mce')) wp_tiny_mce(); |
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 | |
/* | |
Author: Takayuki Miyauchi | |
URL: http://firegoby.theta.ne.jp/archives/2246 | |
*/ | |
class instagram { | |
private $json = "http://instagram.heroku.com/users/%s.json"; | |
private $atom = "http://instagram.heroku.com/users/%s.atom"; |
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 | |
class switchTheme { | |
private $name = null; | |
private $dir = null; | |
private $url = null; | |
function __construct($name = null, $dir = null, $url = null) | |
{ | |
$this->name = $name; |
OlderNewer