{"id":443,"date":"2017-07-29T03:49:02","date_gmt":"2017-07-28T18:49:02","guid":{"rendered":"https:\/\/blog.srytk.com\/aquei\/?p=443"},"modified":"2018-10-12T07:18:48","modified_gmt":"2018-10-11T22:18:48","slug":"wordpress%e3%81%ae%e5%9f%8b%e3%82%81%e8%be%bc%e3%81%bf%e8%a8%98%e4%ba%8b%e3%81%afiframe%e3%81%ae%e9%ab%98%e3%81%95%e3%82%92%e6%93%8d%e4%bd%9c%e3%81%a7%e3%81%8d%e3%82%8b","status":"publish","type":"post","link":"https:\/\/blog.srytk.com\/aquei\/443.html","title":{"rendered":"WordPress\u306e\u57cb\u3081\u8fbc\u307f\u8a18\u4e8b\u306fiframe\u306e\u9ad8\u3055\u3092\u64cd\u4f5c\u3067\u304d\u308b"},"content":{"rendered":"<p>WordPress\u306eembed\u95a2\u4fc2\u306e\u30b3\u30fc\u30c9\u3092\u898b\u3066\u3044\u3066\u3001\u3061\u3087\u3063\u3068\u4ee5\u5916\u306a\u3053\u3068\u3092\u77e5\u3063\u305f\u3002WordPress\u8a18\u4e8b\u306e\u57cb\u3081\u8fbc\u307f\u30da\u30fc\u30b8(\/embed)\u306f\u57cb\u3081\u8fbc\u307e\u308c\u305f\u5148\u306eWordPress\u30d6\u30ed\u30b0\u3068\u901a\u4fe1\u3057\u3066\u3044\u3066\u3001\u8aad\u307f\u8fbc\u307f\u6642\u3084\u30ea\u30b5\u30a4\u30ba\u6642\u306a\u3069\u306b\u57cb\u3081\u8fbc\u307f\u30da\u30fc\u30b8\u306e\u9ad8\u3055(height)\u3092\u4f1d\u3048\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u306a\u57cb\u3081\u8fbc\u307f\u3092\u5b9f\u73fe\u3057\u3066\u3044\u308b\u3002\u3060\u304b\u3089WordPress\u30d6\u30ed\u30b0\u306b\u57cb\u3081\u8fbc\u307e\u308c\u3066\u3044\u308b\u9650\u308a\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u30ea\u30b5\u30a4\u30ba\u3057\u3066\u3082\u57cb\u3081\u8fbc\u307f\u30da\u30fc\u30b8iframe\u306e\u9ad8\u3055\u304c\u52dd\u624b\u306b\u4f38\u3073\u7e2e\u307f\u3057\u3066\u304f\u308c\u308b\u308f\u3051\u3060\u3002<\/p>\n<figure style=\"width: 1024px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.srytk.com\/a\/image-proxy\/img\/mid\/300\/image?https%3A%2F%2Fc1.staticflickr.com%2F9%2F8484%2F8165771383_7fdac0d3fe_k.jpg\" sizes=\"auto, (min-width: 1014px) 800px, (min-width: 768px) calc(100vw - 150px - 4em), (min-width: 480) calc(100vw - 4em), calc(100vw - 2em)\" srcset=\"\/\/www.srytk.com\/a\/image-proxy\/img\/mid\/2048\/image?https%3A%2F%2Fc1.staticflickr.com%2F9%2F8484%2F8165771383_7fdac0d3fe_k.jpg 2048w ,\/\/www.srytk.com\/a\/image-proxy\/img\/mid\/1748\/image?https%3A%2F%2Fc1.staticflickr.com%2F9%2F8484%2F8165771383_7fdac0d3fe_k.jpg 1748w ,\/\/www.srytk.com\/a\/image-proxy\/img\/mid\/1448\/image?https%3A%2F%2Fc1.staticflickr.com%2F9%2F8484%2F8165771383_7fdac0d3fe_k.jpg 1448w ,\/\/www.srytk.com\/a\/image-proxy\/img\/mid\/1148\/image?https%3A%2F%2Fc1.staticflickr.com%2F9%2F8484%2F8165771383_7fdac0d3fe_k.jpg 1148w ,\/\/www.srytk.com\/a\/image-proxy\/img\/mid\/848\/image?https%3A%2F%2Fc1.staticflickr.com%2F9%2F8484%2F8165771383_7fdac0d3fe_k.jpg 848w ,\/\/www.srytk.com\/a\/image-proxy\/img\/mid\/548\/image?https%3A%2F%2Fc1.staticflickr.com%2F9%2F8484%2F8165771383_7fdac0d3fe_k.jpg 548w ,\/\/www.srytk.com\/a\/image-proxy\/img\/mid\/300\/image?https%3A%2F%2Fc1.staticflickr.com%2F9%2F8484%2F8165771383_7fdac0d3fe_k.jpg 300w\" alt=\"\" width=\"1024\" height=\"683\" \/><figcaption class=\"wp-caption-text\">\u00a9 <a href=\"https:\/\/www.flickr.com\/photos\/splorp\/8165771383\/\" rel=\"cc:attributionURL\">Grant Hutchinson<\/a> &#8211; &#8220;Embedded&#8221; &#8211; <a href=\"http:\/\/creativecommons.org\/licenses\/by-nc-nd\/2.0\/deed.en\" rel=\"license\">Creative Commons: Attribution, Noncommercial, No Derivative Works<\/a><\/figcaption><\/figure>\n<p>\u3046\u30fc\u3093\u3001\u57cb\u3081\u8fbc\u307e\u308c\u305f\u5148\u306e\u30da\u30fc\u30b8\u3092\u64cd\u4f5c\u3067\u304d\u308b\u3068\u3044\u3046\u306e\u306f\u3001\u306a\u3093\u3060\u304b\u9762\u767d\u305d\u3046\u3060\u3002<\/p>\n<p><!--more--><\/p>\n<p><div class=\"embed-container\" data-purely-embed-scheme=\"https\" data-purely-embed-host=\"gistcdn.githack.com\" data-purely-embed-path=\"\/Aquei\/1c626588542e9763576eb15075b4c9b6\/raw\/c6bce0fdb1685c84d708b0a7309ec5eeef2b09a2\/embed-test.html\"><iframe loading=\"lazy\" class=\"wp-embedded-content\" src=\"https:\/\/gistcdn.githack.com\/Aquei\/1c626588542e9763576eb15075b4c9b6\/raw\/c6bce0fdb1685c84d708b0a7309ec5eeef2b09a2\/embed-test.html\" width=\"400\" height=\"150\"><\/iframe><\/div><\/p>\n<p>\u3061\u3087\u3063\u3068\u304a\u904a\u3073\u3068\u3057\u3066\u3001<a href=\"https:\/\/jsbin.com\/wilamikowi\/1\/edit?html,css,js,output\">\u3053\u306e\u3088\u3046\u306a\u30da\u30fc\u30b8<\/a>\u3092\u7528\u610f\u3057\u305f\u3002\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u9ad8\u3055\u304c\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3059\u308b\u6587\u7ae0\u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\n<pre><code>button:before {\r\n    content: 'close';\r\n}\r\nbutton.more:before {\r\n    content: 'more'\r\n}\r\np {\r\n    margin-bottom: 0;\r\n    padding-bottom: 0;\r\n    max-height: 100vh;\r\n    overflow: hidden;\r\n    transition: max-height 2s;\r\n}\r\np.hide {\r\n    max-height: 0;\r\n}<\/code><\/pre>\n<pre><code>var btn = document.querySelector(\"button\");\r\nvar p = document.querySelector(\"p\");\r\nvar status = false;\r\nvar cb = () =&gt; {\r\n  if (status) {\r\n    return;\r\n  } else {\r\n    status = true;\r\n  }\r\n\r\n  var timer = setInterval(() =&gt; window.dispatchEvent(new Event('resize')), 20);\r\n  p.classList.toggle(\"hide\");\r\n  btn.classList.toggle(\"more\");\r\n  setTimeout(() =&gt; {\r\n    clearInterval(timer);\r\n    status = false;\r\n  }, 2000);\r\n}\r\n\r\nbtn.addEventListener(\"click\", cb, false);<\/code><\/pre>\n<p>\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u30682\u79d2\u9593\u306e\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u9593\u300120\u30df\u30ea\u79d2\u3054\u3068\u306b\u30ea\u30b5\u30a4\u30ba\u30a4\u30d9\u30f3\u30c8\u3092\u767a\u751f\u3055\u305b\u3066\u3044\u308b\u3002\u3042\u3068\u3001\u5f53\u7136\u3060\u304c\u3001<a href=\"https:\/\/github.com\/WordPress\/WordPress\/blob\/4.8\/wp-includes\/js\/wp-embed-template.js\">WordPress\u30d6\u30ed\u30b0\u3068\u901a\u4fe1\u3059\u308b\u305f\u3081\u306e\u30b9\u30af\u30ea\u30d7\u30c8<\/a>\u3082\u8aad\u307f\u8fbc\u3093\u3067\u3044\u308b\u3002\u305d\u308c\u304b\u3089\u3001\u4eca\u6c17\u304c\u3064\u3044\u305f\u304c\u3001\u3046\u3063\u304b\u308aarrow function\u3092\u4f7f\u3063\u305f\u306e\u3067IE\u3060\u3068\u30a8\u30e9\u30fc\u304c\u3067\u308b\u3060\u308d\u3046\u3051\u3069\u77e5\u3063\u305f\u3053\u3063\u3061\u3083\u306a\u3044\u3002<\/p>\n<p>\u3055\u3066\u3001\u3053\u306e\u30d6\u30ed\u30b0\u306f\uff08\u5c11\u306a\u304f\u3068\u3082\u4eca\u306f\uff09WordPress\u3067\u52d5\u3044\u3066\u3044\u308b\u306e\u3067\u3001more\u3068\u66f8\u304b\u308c\u305f\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3068\u3001\u30d3\u30ed\u30fc\u30f3\u3068\u6587\u7ae0\u304c\u73fe\u308ciframe\u306e\u9ad8\u3055\u304c\uff08\u304e\u3053\u3061\u306a\u304f\uff09\u5909\u66f4\u3057\u3066\u3044\u304f\u306f\u305a\u3002\u697d\u3057\u3044\u3002\u9762\u5012\u306a\u3053\u3068\u306fWordPress\u306e\u57cb\u3081\u8fbc\u307f\u7528JavaScript\u304c\u3084\u3063\u3066\u304f\u308c\u308b\u306e\u3067\u3001\u57cb\u3081\u8fbc\u307f\u30da\u30fc\u30b8\u3067\u306f\u826f\u304d\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u30ea\u30b5\u30a4\u30ba\u30a4\u30d9\u30f3\u30c8\u3092\u547c\u3076\u3060\u3051\u3068\u3044\u3046\u306e\u3082\u624b\u8efd\u3002<\/p>\n<p>\u5b50\u30a6\u30a3\u30f3\u30c9\u30a6\u304b\u3089\u9ad8\u3055\u3092\u5909\u66f4\u3067\u304d\u308b\u306e\u304c\u78ba\u8a8d\u3067\u304d\u305f\u3068\u3053\u308d\u3067\u3001\u3061\u3087\u3063\u3068\u3057\u305f\u30a4\u30bf\u30ba\u30e9\u3082\u3067\u304d\u306a\u3044\u304b\u3068\u8abf\u3079\u3066\u307f\u305f\u304c\u3001\u6d41\u77f3\u306b\u7121\u7406\u3060\u3063\u305f\u3002\u4f8b\u3048\u3070\u3001\u57cb\u3081\u8fbc\u307e\u308c\u305f\u30da\u30fc\u30b8\u306b\u3042\u308b<strong>\u4ed6\u306e<\/strong>\u57cb\u3081\u8fbc\u307f\u30da\u30fc\u30b8\u306e\u9ad8\u3055\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\u3002\u305d\u308c\u305e\u308c\u306e<a href=\"https:\/\/github.com\/WordPress\/WordPress\/blob\/4.8\/wp-includes\/js\/wp-embed.js#L101\">\u57cb\u3081\u8fbc\u307fiframe\u306f\u30e9\u30f3\u30c0\u30e0\u306a\u79d8\u5bc6\u306e\u6587\u5b57\u5217\u304c\u4e0e\u3048\u3089\u308c<\/a>\u3001\u305d\u306e\u6587\u5b57\u5217\u3068\u4e00\u81f4\u3059\u308biframe\u3060\u3051\u5909\u66f4\u3055\u308c\u308b\u304b\u3089\u3060\u3002<\/p>\n<p>\u307e\u305f\u3001\u6975\u7aef\u306a\u5024\u3092\u9ad8\u3055\u3068\u3057\u3066\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\u3002<a href=\"https:\/\/github.com\/WordPress\/WordPress\/blob\/4.8\/wp-includes\/js\/wp-embed.js#L58\">\u57cb\u3081\u8fbc\u307f\u30da\u30fc\u30b8\u306e\u9ad8\u3055\u306f200\u4ee5\u4e0a1000\u4ee5\u4e0b\u306b\u9650\u5b9a<\/a>\u3055\u308c\u3001\u3053\u306e\u7bc4\u56f2\u5916\u306e\u5024\u306f\u6700\u5927\u5024\uff08\u6700\u5c0f\u5024\uff09\u306b\u8a2d\u5b9a\u3055\u308c\u308b\u3002\u4e0a\u306e\u30c7\u30e2\u57cb\u3081\u8fbc\u307f\u30da\u30fc\u30b8\u306e\u4e0b\u90e8\u5206\u306b\u8b0e\u306e\u30b9\u30da\u30fc\u30b9\u304c\u3042\u308b\u306e\u3082\u3053\u306e\u305b\u3044\u3060\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3082\u304e\u3053\u3061\u306a\u3044\u3002\u7d30\u304b\u304f\u30ea\u30b5\u30a4\u30ba\u30a4\u30d9\u30f3\u30c8\u3092\u767a\u751f\u3055\u305b\u3066\u3082\u3001<a href=\"https:\/\/github.com\/WordPress\/WordPress\/blob\/4.8\/wp-includes\/js\/wp-embed-template.js#L183\">\u5b9f\u969b\u306biframe\u306e\u9ad8\u3055\u304c\u5909\u66f4\u3055\u308c\u308b\u306e\u306f\u6700\u5f8c\u306e100\u30df\u30ea\u79d2\u306e\u3088\u3046\u3060<\/a>\u3002\u3059\u306a\u308f\u3061\u4e0a\u306e\u3088\u3046\u306b20\u30df\u30ea\u79d2\u3054\u3068\u306b\u30ea\u30b5\u30a4\u30ba\u30a4\u30d9\u30f3\u30c8\u3092\u767a\u751f\u3055\u305b\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u307e\u3063\u305f\u304f\u610f\u5473\u304c\u306a\u304b\u3063\u305f&#x1f622;\u3000\u305f\u3060\u3053\u308c\u306f\u3001\u9001\u4fe1\uff08\u57cb\u3081\u8fbc\u307f\u30da\u30fc\u30b8\uff09\u5074\u306e\u5236\u9650\u306a\u306e\u3067\u3001\u81ea\u5206\u3067WordPress\u30d6\u30ed\u30b0\u3068\u306e\u901a\u4fe1\u3092\u5b9f\u88c5\u3057\u305f\u5834\u5408\u306f\u81ea\u7531\u3060\u3051\u3069\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u6ce8\u610f\u70b9\u3068\u3057\u3066\u3001<strong>WordPress\u30d6\u30ed\u30b0\u304c\u57cb\u3081\u8fbc\u307f\u30da\u30fc\u30b8\u3068\u901a\u4fe1\u3059\u308b\u306e\u306f\u3001iframe\u304cwp-embedded-content\u3068\u3044\u3046\u30af\u30e9\u30b9\u3092\u6301\u3064\u5834\u5408\u3060\u3051<\/strong>\u3060\u3002WordPress\u8a18\u4e8b\u306e\u57cb\u3081\u8fbc\u307f\u7528HTML\u30b3\u30fc\u30c9\u3084oembed\u6a5f\u80fd\u3067\u306f\u6a19\u6e96\u3067iframe\u306b<a href=\"https:\/\/github.com\/WordPress\/WordPress\/blob\/4.8\/wp-includes\/embed.php#L460\">\u3053\u306e\u30af\u30e9\u30b9\u304c\u4ed8\u4e0e<\/a>\u3055\u308c\u3066\u3044\u308b\u3002\u9006\u306b\u3001iframe\u304c\u3053\u306e\u30af\u30e9\u30b9\u3055\u3048\u6301\u3063\u3066\u3044\u308c\u3070\u3044\u3044\u306e\u3067\u3001\u4ed6\u306eCMS\u3084\u57cb\u3081\u8fbc\u307f\u6a5f\u80fd\u306e\u3042\u308b\u30b5\u30fc\u30d3\u30b9\u3067\u3082\u3001\u57cb\u3081\u8fbc\u307f\u30b3\u30fc\u30c9\u306bwp-embeded-content\u30af\u30e9\u30b9\u3092\u4ed8\u4e0e\u3057\u3066\u901a\u4fe1\u7528js\u3092\u4f5c\u3063\u3066\u304a\u304f\u3060\u3051\u3067\uff08WordPress\u306b\u8cbc\u308a\u4ed8\u3051\u3089\u308c\u305f\u6642\u3060\u3051\uff09\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u306a\u57cb\u3081\u8fbc\u307f\u304c\u63d0\u4f9b\u3067\u304d\u308b\u3002\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u306a\u57cb\u3081\u8fbc\u307f\u306f\u4fbf\u5229\u306a\u306e\u3067\u3001\u5225\u306e\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u304c\u3067\u304d\u308c\u3070\u3044\u3044\u306e\u3060\u3051\u308c\u3069\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress\u306eembed\u95a2\u4fc2\u306e\u30b3\u30fc\u30c9\u3092\u898b\u3066\u3044\u3066\u3001\u3061\u3087\u3063\u3068\u4ee5\u5916\u306a\u3053\u3068\u3092\u77e5\u3063\u305f\u3002WordPress\u8a18\u4e8b\u306e\u57cb\u3081\u8fbc\u307f\u30da\u30fc\u30b8(\/embed)\u306f\u57cb\u3081\u8fbc\u307e\u308c\u305f\u5148\u306eWordPress\u30d6\u30ed\u30b0\u3068\u901a\u4fe1\u3057\u3066\u3044\u3066\u3001\u8aad\u307f\u8fbc\u307f\u6642\u3084\u30ea\u30b5\u30a4\u30ba\u6642\u306a\u3069 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"local","activitypub_max_image_attachments":5,"footnotes":""},"categories":[2],"tags":[39,3],"class_list":["post-443","post","type-post","status-publish","format-standard","hentry","category-tech","tag-oembed","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/blog.srytk.com\/aquei\/wp-json\/wp\/v2\/posts\/443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.srytk.com\/aquei\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.srytk.com\/aquei\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.srytk.com\/aquei\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.srytk.com\/aquei\/wp-json\/wp\/v2\/comments?post=443"}],"version-history":[{"count":3,"href":"https:\/\/blog.srytk.com\/aquei\/wp-json\/wp\/v2\/posts\/443\/revisions"}],"predecessor-version":[{"id":496,"href":"https:\/\/blog.srytk.com\/aquei\/wp-json\/wp\/v2\/posts\/443\/revisions\/496"}],"wp:attachment":[{"href":"https:\/\/blog.srytk.com\/aquei\/wp-json\/wp\/v2\/media?parent=443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.srytk.com\/aquei\/wp-json\/wp\/v2\/categories?post=443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.srytk.com\/aquei\/wp-json\/wp\/v2\/tags?post=443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}