{"id":514,"date":"2009-04-28T14:58:01","date_gmt":"2009-04-28T05:58:01","guid":{"rendered":"http:\/\/www.white-room.jp\/blog\/?p=514"},"modified":"2011-07-28T05:19:55","modified_gmt":"2011-07-27T20:19:55","slug":"%e4%bd%9c%e6%a5%ad%e8%bb%bd%e6%b8%9b%e7%ad%96%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.white-room.jp\/blog\/?p=514","title":{"rendered":"\u4f5c\u696d\u8efd\u6e1b\u7b56\u3002"},"content":{"rendered":"<p><a href=\"http:\/\/www.mediax-co.com\/md\/mdcomics\/\" target=\"_blank\" title=\"\">MD Comics Neo<\/a>\u306e\u30da\u30fc\u30b8\u3067\u3059\u304c\u3001\u3084\u3063\u3064\u3051\u98a8\u5473\u306e\u4ed5\u69d8\u306b\u306a\u3063\u3066\u3044\u305f\u3001\u753b\u50cf\u306e\u30bf\u30b0\u5165\u308c\u90e8\u5206\u3092\u3001\u7206\u4e73\u69d8\uff08\u4eee\u540d\uff09\u306e\u8ca0\u62c5\u3092\u8efd\u6e1b\u3059\u308b\u305f\u3081\u3068\u3001\u30df\u30b9\u3059\u308b\u9699\u3092\u57cb\u3081\u308b\u305f\u3081\u306b\u3001\u4ed5\u69d8\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u53d6\u308a\u5408\u3048\u305a\u8981\u6c42\u4ed5\u69d8\u3092\u6e80\u305f\u3059\u305f\u3081\u306b\u3001\u305d\u308c\u305e\u308c\u306e\u30b5\u30a4\u30ba\u306e\u30bf\u30b0\u3092\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5165\u308c\u308b\u3068\u3044\u3046\u3001\u975e\u5e38\u306b\u56de\u308a\u304f\u3069\u3044\u624b\u9806\u306b\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u3001\u305d\u306e\u90e8\u5206\u3092<a href=\"http:\/\/tenderfeel.xsrv.jp\/wordpress\/513\/\" target=\"_blank\" title=\"\">\u3053\u3061\u3089<\/a>\u3068<a href=\"http:\/\/wordpress.org\/support\/topic\/197746\" target=\"_blank\" title=\"\">\u3053\u3061\u3089<\/a>\u3092\u53c2\u8003\u306b\u3057\u3066\u3001\u52dd\u624b\u306b\u3084\u3063\u3066\u304f\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002\u3082\u306f\u3084\u3001\u300c\u6295\u7a3f\u306b\u633f\u5165\u300d\u3059\u3089\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093w\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\/* functions.php*\/\r\nfunction get_the_post_image($postid,$size,$order=0,$max=null) {\r\n    $attachments = get_children(array(\r\n                                    &#039;post_parent&#039; =&gt; $postid,\r\n                                    &#039;post_type&#039; =&gt; &#039;attachment&#039;,\r\n                                    &#039;post_mime_type&#039; =&gt; &#039;image&#039;\r\n                                    ));\r\n    if ( is_array($attachments) ){\r\n        foreach ($attachments as $key =&gt; $row) {\r\n            $mo&#x5B;$key]  = $row-&gt;menu_order;\r\n            $aid&#x5B;$key] = $row-&gt;ID;\r\n        }\r\n        array_multisort($mo, SORT_ASC,$aid,SORT_ASC,$attachments);\r\n        $max = empty($max)? $order+1 :$max;\r\n        \r\n        for($i=$order;$i&lt;$max;$i++){\r\n            $the_image = $attachments&amp;#91;$i&amp;#93;;\r\n            $attachmenturl = wp_get_attachment_url($the_image-&gt;ID);\r\n            $attachmentimage = wp_get_attachment_image($the_image-&gt;ID, $size );\r\n            $img_title = $the_image-&gt;post_title;\r\n            $img_desc = $the_image-&gt;post_excerpt;\r\n            $img_alt = $the_image-&gt;post_name;\r\n            \r\n            if ($size == &quot;thumbnail&quot; || $size == &quot;medium&quot;){\r\n                $attachmentimage = preg_replace(&#039;\/class=&quot;attachment.*?&quot;\/&#039;,&#039;class=&quot;alignright size-&#039;.$size.&#039;&quot;&#039;,$attachmentimage);\/\/CSS\u306b\u5408\u308f\u305b\u308b\u305f\u3081\r\n                 $attachmentimage = preg_replace(&#039;\/alt=&quot;.*?&quot;\/&#039;,&#039;alt=&quot;&#039;.attribute_escape($img_alt).&#039;&quot;&#039;,$attachmentimage);\/\/alt\u304c\u76f4\u63a5\u62fe\u3048\u306a\u3044\u306e\u3067\r\n                echo &#039;&lt;a href=&quot;&#039;.clean_url($attachmenturl).&#039;&quot; rel=&quot;lightbox&amp;#91;&#039;.get_the_ID().&#039;&amp;#93;&quot; title=&quot;&#039;.attribute_escape($img_title).&#039;&quot;&gt;&#039;.$attachmentimage.&#039;&lt;\/a&gt;&#039;;\r\n            } elseif($size == &quot;large&quot;) {\r\n                $attachmentimage = preg_replace(&#039;\/class=&quot;attachment.*?&quot;\/&#039;,&#039;class=&quot;alignright size-&#039;.$size.&#039;&quot;&#039;,$attachmentimage);\r\n                 $attachmentimage = preg_replace(&#039;\/alt=&quot;.*?&quot;\/&#039;,&#039;alt=&quot;&#039;.attribute_escape($img_alt).&#039;&quot;&#039;,$attachmentimage);\r\n                echo $attachmentimage;\r\n            } else {\r\n                echo &#039;&lt;img src=&quot;&#039;.clean_url($attachmenturl).&#039;&quot;&gt;&#039;;\r\n            }\r\n            \r\n        }\r\n        \r\n    }\r\n    \r\n}\r\n\/* index.php\u306a\u3069\u3067\u306e\u547c\u3073\u51fa\u3057\u90e8\u5206*\/\r\n&lt;?php  get_the_post_image(get_the_ID(), &#039;thumbnail&#039;, 0, 1); ?&gt;\r\n\/* get_the_post_image($post_id, $size, $order, $max)\r\n$post_id= \u8a18\u4e8bID\r\n$size = \u753b\u50cf\u306e\u30b5\u30a4\u30ba\uff08thumbnail,medium,large,full)\r\n$order = \u30ae\u30e3\u30e9\u30ea\u30fc\u3067\u306e\u9806\u756a\r\n$max = $order\u304b\u3089\u4f55\u679a\u4f7f\u3046\u304b\r\n*WebTecNote\u3055\u3093\u3088\u308a\u62dd\u501f\u3002*\r\n*\/\r\n<\/pre>\n<p><a href=\"http:\/\/tenderfeel.xsrv.jp\/wordpress\/513\/\" target=\"_blank\" title=\"\">WebTecNote<\/a>\u3055\u3093\u304b\u3089\u3001\u8a18\u4e8b\u306b\u6dfb\u4ed8\u3055\u308c\u305f\u753b\u50cf\u3092\u30bd\u30fc\u30c8\u3059\u308b\u90e8\u5206\u3092\u62dd\u501f\u3057\u3066\u3001<a href=\"http:\/\/wordpress.org\/support\/topic\/197746\" target=\"_blank\" title=\"\">Forum<\/a>\u304b\u3089\u30c7\u30fc\u30bf\u3092\u62fe\u3046\u90e8\u5206\u3092\u3044\u305f\u3060\u3044\u3066\u3001\u304f\u3063\u3064\u3051\u305f\u3060\u3051\u306e\u3082\u306e\u3067\u3059\u304c\u2026\u2026\u3002<\/p>\n<p>\u3053\u308c\u3067\u3001\u6249\u30da\u30fc\u30b8\u3068\u3001\u500b\u5225\u30da\u30fc\u30b8\u3068\u3001\u30ea\u30b9\u30c8\u30da\u30fc\u30b8\u306b\u3001\u305d\u308c\u305e\u308c\u3001\u4f55\u3082\u305b\u305a\u306b\u4e88\u5b9a\u3069\u304a\u308a\u306e\u753b\u50cf\u304c\u5165\u308b\u3088\u3046\u306b\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u5148\u4eba\u306e\u7686\u3055\u3093\u306b\u611f\u8b1d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MD Comics Neo\u306e\u30da\u30fc\u30b8\u3067\u3059\u304c\u3001\u3084\u3063\u3064\u3051\u98a8\u5473\u306e\u4ed5\u69d8\u306b\u306a\u3063\u3066\u3044\u305f\u3001\u753b\u50cf\u306e\u30bf\u30b0\u5165\u308c\u90e8\u5206\u3092\u3001\u7206\u4e73\u69d8\uff08\u4eee\u540d\uff09\u306e\u8ca0\u62c5\u3092\u8efd\u6e1b\u3059\u308b\u305f\u3081\u3068\u3001\u30df\u30b9\u3059\u308b\u9699\u3092\u57cb\u3081\u308b\u305f\u3081\u306b\u3001\u4ed5\u69d8\u5909\u66f4\u3057\u307e\u3057\u305f\u3002 \u53d6\u308a\u5408\u3048\u305a\u8981\u6c42\u4ed5\u69d8\u3092\u6e80\u305f\u3059\u305f\u3081\u306b\u3001\u305d\u308c\u305e [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-514","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=514"}],"version-history":[{"count":0,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/514\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.white-room.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}