@woodrootsさんが投稿したコード一覧

HSPのテスト

http://antares.cn/hsp/sample/index.html#tournament より。
http://antares.cn/hsp/sample/index.html#tournament より。
;
#ifdef __hsp30__
#define objselstr(%1,%2,%3) vvv=%3: sendmsg objinfo(%1,2),177,%2,varptr(vvv)
#define getact(%1) %1=ginfo_act
#else
コードを見る
  • タグ:
  • タグはありません

ファイル名に混入した半角を除去byDW

ホーム○ージ○ルダーとかでよくわかってない人がつくるとファイル名なんて適当なので。
ホーム○ージ○ルダーとかでよくわかってない人がつくるとファイル名なんて適当なので。
src="([^"]*) ([^"]*)"

を

src="$1$2"
コードを見る
  • タグ:
  • タグはありません

JSONPの定義と基本的な使い方

JSONPの書式を自前で用意するときとそれを呼び出すとき
JSONPの書式を自前で用意するときとそれを呼び出すとき
callback(
	{"category":[
			{"catid": "001","catname": "test1"},
			{"catid": "002","catname": "test2"},
			{"catid": "003","catname": "test3"},
コードを見る
  • タグ:
  • タグはありません

よくある写真+文字が横並びのときのCSS

http://dl.dropbox.com/u/31478093/mihon.jpg みたいなレイアウトをHTML+CSSで組む時に画像+文字をinline-blockにしてますが、文字が長くなること...
http://dl.dropbox.com/u/31478093/mihon.jpg みたいなレイアウトをHTML+CSSで組む時に画像+文字をinline-blockにしてますが、文字が長くなること...
<style type="text/css">
.item {
	display: inline-block; /* IE67対応は省略 */
	width: 200px;  /* これを指定したくない。dt(というかdt>img)のwidthによって可変にしたい */
}
コードを見る
  • タグ:
  • タグはありません
  • タグ:
  • タグはありません

テスト

テストです。
テストです。
aaaaaaaaaaaaa
コードを見る
  • タグ:
  • タグはありません

wp_insert_postで記事投稿添付ファイルつき

wp_insert_postで投稿してwp_insert_attachmentで添付をつける 取得するのは<?php $url = wp_get_attachment_url( 20 ) ); ...
wp_insert_postで投稿してwp_insert_attachmentで添付をつける 取得するのは<?php $url = wp_get_attachment_url( 20 ) ); ...
	<form action="./" method="post" enctype="multipart/form-data">
		<table>
			<tr>
				<th>タイトル</th>
				<td><input type="text" name="post_title" /></td>
コードを見る
  • タグ:
  • タグはありません

My Theme Loginのリダイレクトが動かないから無理やり飛ばす

ユーザー登録完了後にリダイレクト。hiddenのredirect_toにはwp_redirectで勝てる。
ユーザー登録完了後にリダイレクト。hiddenのredirect_toにはwp_redirectで勝てる。
function regist_redirect($user_id){
	wp_redirect('/complete/');
};

add_action('user_register', 'regist_redirect', 1 );
コードを見る
  • タグ:
  • タグはありません