{"id":2661,"date":"2013-10-09T01:10:16","date_gmt":"2013-10-08T16:10:16","guid":{"rendered":"http:\/\/apr20.net\/?p=2661"},"modified":"2013-10-09T01:10:16","modified_gmt":"2013-10-08T16:10:16","slug":"wordpress%e3%81%a7%e8%a8%98%e4%ba%8b%e3%81%ab%e7%94%bb%e5%83%8f%e6%8a%95%e7%a8%bf%e3%81%99%e3%82%8b%e9%9a%9b%e3%81%ab%e3%80%81%e8%87%aa%e5%8b%95%e3%81%a7%e3%82%af%e3%83%a9%e3%82%b9%e5%90%8d%e3%82%92","status":"publish","type":"post","link":"https:\/\/apr20.net\/?p=2661","title":{"rendered":"WordPress\u3067\u8a18\u4e8b\u306b\u753b\u50cf\u6295\u7a3f\u3059\u308b\u969b\u306b\u3001\u81ea\u52d5\u3067\u30af\u30e9\u30b9\u540d\u3092\u3064\u3051\u308b"},"content":{"rendered":"<p>\u8a18\u4e8b\u5185\u306e\u753b\u50cf\u3092\u3044\u3044\u611f\u3058\u306e\u30a8\u30d5\u30a7\u30af\u30c8\u3092\u3064\u3051\u3066\u62e1\u5927\u8868\u793a\u3055\u305b\u308bWordPress\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u300cEasy FancyBox\u300d\u3068\u3044\u3046\u306e\u3092\u5c0e\u5165\u3057\u305f\u306e\u3067\u3059\u304c\u3001\u633f\u5165\u3055\u308c\u305fa\u30bf\u30b0\u3084img\u30bf\u30b0\u306b\u56fa\u6709\u306e\u30af\u30e9\u30b9\u540d\u304c\u306a\u3044\u306e\u3067\u3001CSS\u3067\u8abf\u6574\u3057\u3065\u3089\u304b\u3063\u305f\u306e\u3067\u3001\u30ea\u30f3\u30af\u4ed8\u304d\u306e\u753b\u50cf\u3092\u633f\u5165\u3057\u305f\u3044\u969b\u306b\u81ea\u52d5\u3067class\u540d\u3092\u8ffd\u52a0\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>img\u30bf\u30b0\u306bclass\u3092\u8ffd\u52a0\u3059\u308b\u5834\u5408\u3068a\u30bf\u30b0\u306b\u8ffd\u52a0\u3059\u308b\u5834\u5408\u3092\u5206\u3051\u3066\u66f8\u304d\u307e\u3059\u3002<\/p>\n<h3>\u633f\u5165\u3055\u308c\u305fimg\u30bf\u30b0\u306bclass\u540d\u3092\u3064\u3051\u308b<\/h3>\n<p><strong>functions.php\u5185\u306b\u8a18\u8ff0<\/strong><br \/>\n[php]<br \/>\n&lt;?php<br \/>\n\/\/ \u8a18\u4e8b\u306b\u753b\u50cf\u6295\u7a3f\u3059\u308b\u969b\u306b\u3001\u81ea\u52d5\u3067\u30af\u30e9\u30b9\u540d\u3092\u3064\u3051\u308b<br \/>\nfunction give_linked_images_class($html, $id, $caption, $title, $align, $url, $size, $alt = &#8221; ){<br \/>\n  $classes = &#8216;fancybox img-rounded&#8217;; \/\/ separated by spaces, e.g. &#8216;img image-link&#8217;<\/p>\n<p>  \/\/ check if there are already classes assigned to the anchor<br \/>\n  if ( preg_match(&#8216;\/&lt;img.*? class=&quot;.*?&quot; \\\/&gt;\/&#8217;, $html) ) {<br \/>\n    $html = preg_replace(&#8216;\/(&lt;img.*? class=&quot;.*?)(&quot;.*?\\\/&gt;)\/&#8217;, &#8216;$1 &#8216; . $classes . &#8216;$2&#8217;, $html);<br \/>\n  } else {<br \/>\n    $html = preg_replace(&#8216;\/(&lt;img.*?)\\\/&gt;\/&#8217;, &#8216;$1 class=&quot;&#8217; . $classes . &#8216;&quot; &gt;&#8217;, $html);<br \/>\n  }<br \/>\n  return $html;<br \/>\n}<br \/>\nadd_filter(&#8216;image_send_to_editor&#8217;,&#8217;give_linked_images_class&#8217;,10,8);<br \/>\n?&gt;[\/php]<\/p>\n<p>\u7ba1\u7406\u753b\u9762\u3067\u8a18\u4e8b\u6295\u7a3f\u306e\u969b\u306b\u3001\u753b\u50cf\u3092\u633f\u5165\u3059\u308b\u3068\u3001\u305d\u308c\u306b\u300cfancybox img-rounded\u300d\u3068\u3044\u30462\u3064\u306e\u30af\u30e9\u30b9\u3092\u3064\u3051\u308b\u7528\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002img\u30bf\u30b0\u5185\u306b\u65e2\u306bclass\u304c\u3042\u308c\u3070\u3001\u305d\u3053\u306b\u8ffd\u52a0\u3001\u306a\u3051\u308c\u3070\u3001class\u3092\u65b0\u898f\u8a2d\u5b9a\u3059\u308b\u3001\u3068\u3044\u3063\u305f\u611f\u3058\u3067\u3059\u3002\u30bd\u30fc\u30b9\u5185\u306e$1\u3001$2\u306a\u3069\u306f\u6b63\u898f\u8868\u73fe\u306e\u5f8c\u65b9\u53c2\u7167\u3068\u3044\u3046\u3084\u3064\u3067\u3059\u3002\u6b63\u898f\u8868\u73fe\u5185\u306e()\u306e\u5185\u5bb9\u3068\u30de\u30c3\u30c1\u3057\u307e\u3059\u3002\u6700\u521d\u306e()\u306e\u5185\u5bb9\u304c$1\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>\u633f\u5165\u3055\u308c\u305fa\u30bf\u30b0\u306bclass\u540d\u3092\u3064\u3051\u308b<\/h3>\n<p><strong>functions.php\u5185\u306b\u8a18\u8ff0<\/strong><br \/>\n[php]<br \/>\n&lt;?php<br \/>\nfunction give_linked_images_class($html, $id, $caption, $title, $align, $url, $size, $alt = &#8221; ){<br \/>\n  $classes = &#8216;fancybox&#8217;;<\/p>\n<p>  \/\/ check if there are already classes assigned to the anchor<br \/>\n  if ( preg_match(&#8216;\/&lt;a.*? class=&quot;.*?&quot;&gt;\/&#8217;, $html) ) {<br \/>\n    $html = preg_replace(&#8216;\/(&lt;a.*? class=&quot;.*?)(&quot;.*?&gt;)\/&#8217;, &#8216;$1 &#8216; . $classes . &#8216;$2&#8217;, $html);<br \/>\n  } else {<br \/>\n    $html = preg_replace(&#8216;\/(&lt;a.*?)&gt;\/&#8217;, &#8216;$1 class=&quot;&#8217; . $classes . &#8216;&quot; &gt;&#8217;, $html);<br \/>\n  }<br \/>\n  return $html;<br \/>\n}<br \/>\nadd_filter(&#8216;image_send_to_editor&#8217;,&#8217;give_linked_images_class&#8217;,10,8);<br \/>\n?&gt;<br \/>\n[\/php]<\/p>\n<p>a\u30bf\u30b0\u306bclass\u3092\u3064\u3051\u308b\u5834\u5408\u306fimg\u30bf\u30b0\u306e\u5834\u5408\u3068\u307b\u307c\u540c\u3058\u3067\u3059\u3002\u6b63\u898f\u8868\u73fe\u306e\u5185\u5bb9\u304c\u5c11\u3057\u5909\u308f\u308b\u3050\u3089\u3044\u3002<\/p>\n<p>WordPress\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u3068\u3044\u3064\u3082\u601d\u3046\u306e\u3067\u3059\u304c\u3001\u30b3\u30a2\u30d5\u30a1\u30a4\u30eb\u3092\u76f4\u63a5\u89e6\u3089\u306a\u304f\u3066\u3082\u7d30\u304b\u3044\u3068\u3053\u308d\u307e\u3067\u8a2d\u5b9a\u51fa\u6765\u308b\u306e\u306f\u3001\u3068\u3066\u3082\u52a9\u304b\u308a\u307e\u3059\u306d\u3002<\/p>\n<div style=\"position: absolute; overflow: hidden; width: 2px; height: 1px; left: -288; top: -277; z-index: 177;\"><a href=\"http:\/\/insuranceattorneyat.muchtracks.net\">insurance coverage attorney Atlanta<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u8a18\u4e8b\u5185\u306e\u753b\u50cf\u3092\u3044\u3044\u611f\u3058\u306e\u30a8\u30d5\u30a7\u30af\u30c8\u3092\u3064\u3051\u3066\u62e1\u5927\u8868\u793a\u3055\u305b\u308bWordPress\u306e\u30d7\u30e9&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,2,5],"tags":[],"class_list":["post-2661","post","type-post","status-publish","format-standard","hentry","category-php","category-web","category-wordpress-web-category"],"_links":{"self":[{"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/posts\/2661","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2661"}],"version-history":[{"count":0,"href":"https:\/\/apr20.net\/index.php?rest_route=\/wp\/v2\/posts\/2661\/revisions"}],"wp:attachment":[{"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/apr20.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}