« NextGEN Gallery 日本語ファイル | トップページ | お知らせ »

2008-04-12

WP-添付ファイルデータテーブルメモ

データテーブル&キー
wp_postmeta
meta_key = "_wp_attachment_metadata"

●WP 2.1-2.3

(実例)
a:5:{
    s:5:"width";i:1280;
    s:6:"height";i:960;
    s:14:"hwstring_small";s:23:"height='96' width='128'";
    s:4:"file";s:21:"/hogehoge/foo/var.jpg";
    s:5:"thumb";s:17:"var.thumbnail.jpg";
}

(配列表現)
array {
    ['width'] = 画像幅
    ['height'] = 画像高さ
    ['hwstring_small'] = 縮小サイズ表記
    ['file'] = 画像ファイルパス
    ['thumb'] = サムネイルファイル名
}



●WP 2.5

(実例)
a:6:{
    s:5:"width";i:787;
    s:6:"height";i:560;
    s:14:"hwstring_small";s:23:"height='91' width='128'";
    s:4:"file";s:21:"/hogehoge/foo/var.jpg";
    s:5:"sizes";a:2:{
        s:9:"thumbnail";a:3:{
            s:4:"file";s:19:"0013142-150x150.jpg";
            s:5:"width";i:150;
            s:6:"height";i:150;
        }
        s:6:"medium";a:3:{
            s:4:"file";s:19:"0013142-300x213.jpg";
            s:5:"width";i:300;
            s:6:"height";i:213;
        }
    }
    s:10:"image_meta";a:10:{
        s:8:"aperture";d:4;
        s:6:"credit";s:0:"";
        s:6:"camera";s:18:"Canon PowerShot";
        s:7:"caption";s:0:"";
        s:17:"created_timestamp";i:1181695421;
        s:9:"copyright";s:0:"";
        s:12:"focal_length";d:7.1875;
        s:3:"iso";i:0;
        s:13:"shutter_speed";d:0.004;
        s:5:"title";s:0:"";
    }
}

(配列表現)
array {
    ['width'] = 画像幅
    ['height'] = 画像高さ
    ['hwstring_small'] = 縮小サイズ表記
    ['file'] = 画像ファイルパス
    ['size'] = array {
        ['thumbnail'] = array {
            ['file'] = サムネイルファイル名
            ['width'] = サムネイル幅
            ['height'] = サムネイル高さ
        }
        ['medium'] = array {
            ['file'] = 中くらいの画像ファイル名
            ['width'] = 中くらいの画像幅
            ['height'] = 中くらいの画像高さ
        }
    }
    ['image_meta'] = array {
        /* 画像埋め込みメタ情報 (Exif) */
        ['aperture'] =
        ['credit'] =
        ['camera'] =
        ['caption'] =
        ['created_timestamp'] =
        ['copyright'] =
        ['focal_length'] =
        ['iso'] =
        ['title'] =
    }
}

※"image_meta"は画像エディタなどのExifの無い画像であっても生成される(内容は空)

|

« NextGEN Gallery 日本語ファイル | トップページ | お知らせ »

コメント

この記事へのコメントは終了しました。

トラックバック


この記事へのトラックバック一覧です: WP-添付ファイルデータテーブルメモ:

« NextGEN Gallery 日本語ファイル | トップページ | お知らせ »