関数で動的にスクリプトを読み込んだときのスクリプトの実行順序の確認用。
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: Example | |
Version: 1.0 | |
Plugin URI: http://www.example.com | |
Description: Wordpress plugin template | |
Author: Example | |
Author URI: 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
/** | |
* example | |
* http://www.example.com | |
* | |
* Copyright (c) 2012 "Example corp" My name | |
* Licensed under example license. | |
*/ | |
/* global object is Example */ |
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
jQuery(function ($) { | |
// 拡張用の名前空間 | |
var Util = {}; | |
// jQueryの拡張 | |
jQuery.extend({'util': Util}); | |
// 静的メソッドの追加 | |
Util.hoge = function () { | |
}; | |
// その他の処理 | |
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
/** | |
* foreachを使ったサンプル | |
* | |
* reffer | |
* get_posts | |
* http://codex.wordpress.org/Template_Tags/get_posts | |
*/ | |
<?php | |
$args = array( | |
'posts_per_page' => 5, |
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 | |
if (is_category('example') || in_category('example')) { | |
if (!is_front_page()) { | |
$cat = get_category_by_slug('example'); | |
$cat_id = intval($cat->cat_ID); | |
$url = get_category_link($cat_id); | |
$name = $cat->name; | |
?> | |
<h2><a href="<?php echo esc_url($url); ?>"><?php echo esc_html($name); ?></a></h2> | |
<ul> |
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
/** | |
font size | |
10 77 | |
11 85 | |
12 93 (was 93) | |
13 100 | |
14 108 (was 107) | |
15 116 (was 114) | |
16 123.1 (was 122) | |
17 131 (was 129) |
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 | |
* アイキャッチ付きアーカイブページの雛型 | |
* ■ 詳細ページへのリンク処理 | |
* Moreタグ | |
* 有 - Moreタグの前までを表示 | |
* - リンク「詳細はこちら」のリンクを表示 | |
* - 見出し(h2)にパーマリンクを設定 | |
* 無 - 全文を表示 | |
* - リンク「詳細はこちら」のリンクは非表示 | |
* - 見出し(h2)にパーマリンクを設定しない。 |
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
html | |
body | |
address | |
a:link | |
a:visited | |
a:hover | |
a:active |
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
<!DOCTYPE HTML> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>JSON Padding</title> | |
<script> | |
function doJSONP(text, callback) { | |
var text = (text) || 'Foo', | |
callback = (callback) || 'callback', | |
target = document.createElement('script'); |