{"id":567,"date":"2017-02-24T16:18:21","date_gmt":"2017-02-24T07:18:21","guid":{"rendered":"http:\/\/www.ailove60.com\/?p=567"},"modified":"2023-06-17T15:38:37","modified_gmt":"2023-06-17T06:38:37","slug":"%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e3%81%ab%e9%a0%bc%e3%82%89%e3%81%aa%e3%81%84lightbox%e3%81%ae%e8%a8%ad%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/www.ailove60.com\/?p=567","title":{"rendered":"\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u983c\u3089\u306a\u3044lightbox\u306e\u8a2d\u7f6e"},"content":{"rendered":"<p>WordPress\u30d7\u30e9\u30b0\u30a4\u30f3\u3067photo\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3058\u308f\u30fc\u3063\u3068\u5927\u304d\u304f\u306a\u308blightbox\u3092\u8a2d\u7f6e\u3057\u305f\u304f\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u63a2\u3057\u8a2d\u7f6e\u3057\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u3044\u307e\u3044\u3061\u4f7f\u3044\u65b9\u304c\u826f\u304f\u5206\u304b\u3089\u306a\u3044\u4e0a\u306b\u82f1\u8a9e\u8868\u8a18\u3067\u82f1\u8a33\u3057\u306a\u3044\u3068\u306a\u304b\u306a\u304b\u7406\u89e3\u3057\u304c\u305f\u3044\u3057\u4ed6\u306b\u3082\u540c\u69d8\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u8272\u3005\u3042\u308a\u9078\u629e\u3059\u308b\u306e\u3082\u4e00\u82e6\u52b4\u3067\u3059\u3002\u305d\u3053\u3067\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u983c\u3089\u305a\u3082\u3063\u3068\u5358\u7d14\u306b\u8a2d\u7f6e\u3067\u304d\u306a\u3044\u304b\u3068<a href=\"http:\/\/www.onwil.com\/modules\/wilforum\/index.php?topic_id=186\">Gnavi\u30e2\u30b8\u30e5\u30fc\u30eblightbox\u306e\u6539\u826f<\/a>\u3092\u53c2\u8003\u306b\u3057\u3066\u8003\u3048\u305f\u3082\u306e\u304c\u6b21\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3059\u3002<\/p>\n<p>\u8a2d\u7f6e\u65b9\u6cd5<br \/>\n1.\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<br \/>\nlightbox2\u3092<a href=\"http:\/\/lokeshdhakar.com\/projects\/lightbox2\/\">\u516c\u5f0f\u30b5\u30a4\u30c8<\/a>\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n<p>2.\u30d5\u30a1\u30a4\u30eb\u306e\u8a2d\u7f6e<br \/>\n\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305fsrc\u30d5\u30a9\u30eb\u30c0\u5185\u306e3\u3064\u306e\u30d5\u30a9\u30eb\u30c0\uff08css,images,js\uff09\u3092WordPress\u306e\u30d5\u30a9\u30eb\u30c0\uff08wp-content\u2192theme\u2192\u5229\u7528\u4e2d\u306e\u5b50\u30c6\u30fc\u30de\uff09\u306e\u4e2d\u306b\u8a2d\u7f6e\u3057\u307e\u3059\u3002<\/p>\n<p>3.\u30b3\u30fc\u30c9\u306e\u8a2d\u7f6e<br \/>\n\u5b50\u30c6\u30fc\u30de\u306e\u30d5\u30a9\u30eb\u30c0\u5185\u306b\u672c\u30c6\u30fc\u30de\u306eheader.php\u3092\u30b3\u30d4\u30da\u3057\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u5185\u306e&lt;head&gt;\uff5e&lt;\/head&gt;\u306e\u9593\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">&lt;head&gt;\n\uff65\uff65\uff65\uff65\uff65\uff65\uff65\uff65\uff65\uff65\uff65\uff65\n&lt;link href=\"css\/lightbox.css\" rel=\"stylesheet\" \/&gt;\n&lt;script src=\"js\/lightbox.min.js\"&gt;&lt;\/script&gt;\n&lt;\/head&gt;\n<\/pre>\n<p>4.\u6295\u7a3f\u3067\u306e\u8a18\u8ff0\u65b9\u6cd5<br \/>\n<a href=\"https:\/\/www.ailove60.com\/?p=547\">XOOPS\u306e\u4e2d\u3067\u4e00\u756a\u306e\u304a\u6c17\u306b\u5165\u308a\u306f<\/a>\u3067\u5b9f\u969b\u306b\u5229\u7528\u3057\u305f\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \">&lt;a href=\"https:\/\/www.ailove60.com\/wp-content\/uploads\/2017\/02\/gnavim1.jpg\" \ndata-title='\u30bd\u30ed\u30c4\u30fc\u30ea\u30f3\u30b0\u3068\u6c17\u307e\u307e\u306a\u65c5\u30ea\u30b9\u30c8' data-lightbox='XOOPS' target=\"_blank\"&gt;\n&lt;img class=\"alignnone size-medium wp-image-548\" src=\"https:\/\/www.ailove60.com\/wp-content\/uploads\/2017\/02\/gnavim1-253x300.jpg\" alt=\"\" width=\"253\" height=\"300\" \/&gt;&lt;\/a&gt;\n<\/pre>\n<p>\u30b3\u30fc\u30c9\u306e <span style=\"color: #ff0000;\"><strong>data-title=&#8217;\u753b\u50cf\u306e\u30bf\u30a4\u30c8\u30eb&#8217; data-lightbox=&#8217;\u30b0\u30eb\u30fc\u30d7\u540d&#8217; <\/strong><\/span>\u3068\u3059\u308c\u3070\u8907\u6570\u306e\u753b\u50cf\u3067\u30b0\u30eb\u30fc\u30d7\u540d\u3092\u7d71\u4e00\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u9806\u6b21\u753b\u50cf\u9001\u308a\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4e0a\u8a18\u306e\u65b9\u6cd5\u3067\u306fHTML\u3067\u306e\u7de8\u96c6\u304c\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u3002\u81ea\u52d5\u7684\u306b\u9069\u7528\u3059\u308b\u5834\u5408\u306f\u5b50\u30c6\u30fc\u30de\u306efunctions.php\u5185\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8a2d\u7f6e\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u3053\u306e\u65b9\u6cd5\u3067\u306f\u753b\u50cf\u306e\u30bf\u30a4\u30c8\u30eb\u306f\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3002\u307e\u305f\u3001\u6295\u7a3f\u306e\u969b\u306b\u753b\u50cf\u30ea\u30f3\u30af\u306b\u30e1\u30c7\u30a3\u30a2\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"\"><code>\/\/\u753b\u50cf\u30ea\u30f3\u30af\u306eA\u30bf\u30b0\u3092Lightbox\u306b\u5bfe\u5fdc\u3059\u308b\u3088\u3046\u306b\u4ed8\u3051\u66ff\u3048\nfunction add_lightbox_property( $content ) {\n\u00a0 \/\/\u30d7\u30ec\u30d3\u30e5\u30fc\u3084\u30d5\u30a3\u30fc\u30c9\u3067\u9045\u5ef6\u3055\u305b\u306a\u3044\n\u00a0 if( is_feed() || is_preview() )\n\u00a0\u00a0\u00a0 return $content;\n\u00a0\u00a0 \/\/\u65e2\u306b\u9069\u7528\u3055\u305b\u3066\u3044\u308b\u3068\u3053\u308d\u306f\u51e6\u7406\u3057\u306a\u3044\n\u00a0\u00a0 if ( false !== strpos( $content, 'data-lightbox=\"image\"' ) )\n\u00a0\u00a0\u00a0 return $content;\n\u00a0\u00a0  \/\/A\u30bf\u30b0\u3092\u6b63\u898f\u8868\u73fe\u3067\u7f6e\u63db\n\u00a0   $content = preg_replace(\n\u00a0\u00a0\u00a0 '\/&lt;a([^&gt;]+?)&gt;\\s*(&lt;img[^&gt;]+?&gt;)\\s*&lt;\\\/a&gt;\/',\/\/A\u30bf\u30b0\u306e\u6b63\u898f\u8868\u73fe\n\u00a0\u00a0\u00a0 '&lt;a${1} data-lightbox=\"image\"&gt;${2}&lt;\/a&gt;',\/\/\u7f6e\u63db\u3059\u308b\n\u00a0\u00a0\u00a0 $content );\/\/\u6295\u7a3f\u672c\u6587\uff08\u7f6e\u63db\u3059\u308b\u6587\u7ae0\uff09\n\u00a0\u00a0 \u00a0 \u00a0\n\u00a0\u00a0  return $content;\n}\nadd_filter( 'the_content', 'add_lightbox_property', 11 );<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>WordPress\u30d7\u30e9\u30b0\u30a4\u30f3\u3067photo\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3058\u308f\u30fc\u3063\u3068\u5927\u304d\u304f\u306a\u308blightbox\u3092\u8a2d\u7f6e\u3057\u305f\u304f\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u63a2\u3057\u8a2d\u7f6e\u3057\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u3044\u307e\u3044\u3061\u4f7f\u3044\u65b9\u304c\u826f\u304f\u5206\u304b\u3089\u306a\u3044\u4e0a\u306b\u82f1\u8a9e\u8868\u8a18\u3067\u82f1\u8a33\u3057\u306a\u3044\u3068\u306a\u304b\u306a\u304b\u7406\u89e3\u3057\u304c\u305f\u3044\u3057\u4ed6\u306b\u3082\u540c\u69d8\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u8272\u3005\u3042\u308a\u9078\u629e\u3059\u308b\u306e\u3082\u4e00\u82e6\u52b4\u3067\u3059\u3002\u305d\u3053\u3067\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u983c &hellip; <a href=\"https:\/\/www.ailove60.com\/?p=567\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u983c\u3089\u306a\u3044lightbox\u306e\u8a2d\u7f6e&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":374,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-567","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.ailove60.com\/index.php?rest_route=\/wp\/v2\/posts\/567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ailove60.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ailove60.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ailove60.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ailove60.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=567"}],"version-history":[{"count":20,"href":"https:\/\/www.ailove60.com\/index.php?rest_route=\/wp\/v2\/posts\/567\/revisions"}],"predecessor-version":[{"id":664,"href":"https:\/\/www.ailove60.com\/index.php?rest_route=\/wp\/v2\/posts\/567\/revisions\/664"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ailove60.com\/index.php?rest_route=\/wp\/v2\/media\/374"}],"wp:attachment":[{"href":"https:\/\/www.ailove60.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ailove60.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ailove60.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}