{"id":2128,"date":"2025-05-16T11:41:35","date_gmt":"2025-05-16T02:41:35","guid":{"rendered":"https:\/\/www.dogrow.net\/php\/?p=2128"},"modified":"2025-05-22T18:33:45","modified_gmt":"2025-05-22T09:33:45","slug":"blog81%e3%80%90wordpress%e3%80%91%e7%94%bb%e9%9d%a2%e4%b8%8a%e3%81%ae%e5%9b%ba%e5%ae%9a%e8%a1%a8%e7%a4%ba%e3%83%91%e3%83%bc%e3%83%84%e3%82%92%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e3%81%a7","status":"publish","type":"post","link":"https:\/\/www.dogrow.net\/php\/blog81%e3%80%90wordpress%e3%80%91%e7%94%bb%e9%9d%a2%e4%b8%8a%e3%81%ae%e5%9b%ba%e5%ae%9a%e8%a1%a8%e7%a4%ba%e3%83%91%e3%83%bc%e3%83%84%e3%82%92%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e3%81%a7\/","title":{"rendered":"(81)\u3010WORDPRESS\u3011\u753b\u9762\u4e0a\u306e\u56fa\u5b9a\u8868\u793a\u30d1\u30fc\u30c4\u3092\u30d7\u30e9\u30b0\u30a4\u30f3\u3067\u4f5c\u308b\u3002"},"content":{"rendered":"<h1 class=\"my_h\">\u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p>\u30d6\u30ed\u30b0\u57f7\u7b46\u6642\u3001\u8a18\u4e8b\u306e\u5185\u5bb9\u304c\u30b9\u30af\u30ed\u30fc\u30eb\u3057\u3066\u3082\u3001\u56fa\u5b9a\u4f4d\u7f6e\u3067\u8868\u793a\u3057\u3066\u304a\u304d\u305f\u3044\u30d1\u30fc\u30c4\u304c\u3042\u308b\u3002<br \/>\n\u3053\u308c\u3092 shortcode \u3067\u5b9f\u73fe\u3057\u305f\u3044\u3002<\/p>\n<h1 class=\"my_h\">\u3084\u3063\u3066\u307f\u305f<\/h1>\n<h3 class=\"my_h\">(1) \u30d7\u30ed\u30b0\u30e9\u30e0\u30fb\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9<\/h3>\n<p>\u3068\u308a\u3042\u3048\u305a\u306e\u305f\u305f\u304d\u53f0\u3060\u3002<br \/>\n\u5f8c\u3005\u3001\u88c5\u98fe\u306e\u305f\u3081\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3057\u3066\u884c\u3053\u3046\u3002<\/p>\n<p>\u73fe\u5728\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3002<br \/>\n<table class=\"my_tbl_simple\">\n<tr><td>h<\/td><td>L:\u5de6\u5bc4\u305b R:\u53f3\u5bc4\u305b<\/td><\/tr><tr><td>v<\/td><td>T:\u4e0a\u5bc4\u305b B:\u4e0b\u5bc4\u305b<\/td><\/tr><tr><td>x<\/td><td>h\u3067\u6307\u5b9a\u3057\u305f\u7aef\u304b\u3089\u306e\u30aa\u30d5\u30bb\u30c3\u30c8\u91cf<\/td><\/tr><tr><td>y<\/td><td>v\u3067\u6307\u5b9a\u3057\u305f\u7aef\u304b\u3089\u306e\u30aa\u30d5\u30bb\u30c3\u30c8\u91cf<\/td><\/tr>\n<\/table><\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;?php\r\n\/*\r\nPlugin Name: ZTopFix Shortcode\r\nDescription: &#x5B;ztopfix] \u30b7\u30e7\u30fc\u30c8\u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af\u3067\u5e38\u6642\u6700\u4e0a\u4f4d\u306b\u8868\u793a\u3059\u308b\u3002\r\nVersion: 1.0\r\nAuthor: DOGROW.NET\r\n*\/\r\nfunction ztopfix_shortcode($atts, $content = null) {\r\n    \/\/ \u30c7\u30d5\u30a9\u30eb\u30c8\u5024\r\n    $atts = shortcode_atts(&#x5B;\r\n        &#039;h&#039; =&gt; &#039;L&#039;,\r\n        &#039;v&#039; =&gt; &#039;T&#039;,\r\n        &#039;x&#039; =&gt; &#039;2rem&#039;,\r\n        &#039;y&#039; =&gt; &#039;2rem&#039;\r\n    ], $atts, &#039;ztopfix&#039;);\r\n    \/\/ \u6c34\u5e73\u65b9\u5411\u30b9\u30bf\u30a4\u30eb\r\n    $horizontal_style = &#039;&#039;;\r\n    $x = $atts&#x5B;&#039;x&#039;];\r\n    if (strtoupper($atts&#x5B;&#039;h&#039;]) === &#039;L&#039;) {\r\n        $horizontal_style = &#039;left:&#039;.$x.&#039;;&#039;;\r\n    }\r\n    elseif (strtoupper($atts&#x5B;&#039;h&#039;]) === &#039;R&#039;) {\r\n        $horizontal_style = &#039;right:&#039;.$x.&#039;;&#039;;\r\n    }\r\n    \/\/ \u5782\u76f4\u65b9\u5411\u30b9\u30bf\u30a4\u30eb\r\n    $vertical_style = &#039;&#039;;\r\n    $y = $atts&#x5B;&#039;y&#039;];\r\n    if (strtoupper($atts&#x5B;&#039;v&#039;]) === &#039;T&#039;) {\r\n        $vertical_style = &#039;top:&#039;.$y.&#039;;&#039;;\r\n    } elseif (strtoupper($atts&#x5B;&#039;v&#039;]) === &#039;B&#039;) {\r\n        $vertical_style = &#039;bottom:&#039;.$y.&#039;;&#039;;\r\n    }\r\n    \/\/ \u30b9\u30bf\u30a4\u30eb\u5168\u4f53\r\n    $style = &#039;position: fixed; z-index: 9999;background-color:#fff;padding:1rem;border:0.3rem #000 solid;border-radius:0.5rem;box-shadow:2px 2px 2px rgba(0,0,0,0.5);&#039;.$horizontal_style.$vertical_style;\r\n    return &#039;&lt;div style=&quot;&#039;.esc_attr($style).&#039;&quot;&gt;&#039; . do_shortcode($content) . &#039;&lt;\/div&gt;&#039;;\r\n}\r\nadd_shortcode(&#039;ztopfix&#039;, &#039;ztopfix_shortcode&#039;);\r\n<\/pre>\n<h3 class=\"my_h\">(2) \u4f7f\u3044\u65b9<\/h3>\n<p>\u4eca\u56de\u4f5c\u3063\u305f Shortcode <span class='my_fc_crimsonBBig'>&#091;ztopfix&#093;<\/span> \u3092\u5b9f\u969b\u306b\u4f7f\u3063\u3066\u307f\u308b\u3002<br \/>\n\u30da\u30fc\u30b8\u5de6\u4e0b\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u306f\u3001\u3053\u3046\u3084\u3063\u3066\u8868\u793a\u3057\u3066\u3044\u308b\u3002<\/p>\n<pre class='my_pre_python'>\r\n&#091;ztopfix h=\"L\" v=\"B\" x=\"10rem\" y=\"10rem\"&#093;\r\n&lt;h2 style=\"color:red\"&gt;\u5e38\u306b\u8868\u793a\u3057\u3066\u304a\u304d\u305f\u3044\u3082\u306e\u3092\u30b3\u30b3\u306b\u66f8\u3044\u3066\u304a\u304f\u3002&lt;\/h2&gt;\r\n&#091;\/ztopfix&#093;\r\n<\/pre>\n<hr class=\"my_hr_bottom\">\n<div style=\"position: fixed; z-index: 9999;background-color:#fff;padding:1rem;border:0.3rem #000 solid;border-radius:0.5rem;box-shadow:2px 2px 2px rgba(0,0,0,0.5);left:10rem;bottom:10rem;\"><\/p>\n<h2 style=\"color:#f00\">\u5e38\u306b\u8868\u793a\u3057\u3066\u304a\u304d\u305f\u3044\u3082\u306e\u3092\u30b3\u30b3\u306b\u66f8\u3044\u3066\u304a\u304f\u3002<\/h2>\n<p><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3084\u308a\u305f\u3044\u3053\u3068 \u30d6\u30ed\u30b0\u57f7\u7b46\u6642\u3001\u8a18\u4e8b\u306e\u5185\u5bb9\u304c\u30b9\u30af\u30ed\u30fc\u30eb\u3057\u3066\u3082\u3001\u56fa\u5b9a\u4f4d\u7f6e\u3067\u8868\u793a\u3057\u3066\u304a\u304d\u305f\u3044\u30d1\u30fc\u30c4\u304c\u3042\u308b\u3002 \u3053\u308c\u3092 shortcode \u3067\u5b9f\u73fe\u3057\u305f\u3044\u3002 \u3084\u3063\u3066\u307f\u305f (1) \u30d7\u30ed\u30b0\u30e9\u30e0\u30fb\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9 \u3068\u308a\u3042\u3048\u305a\u306e\u305f\u305f\u304d\u53f0\u3060\u3002 \u5f8c\u3005\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.dogrow.net\/php\/blog81%e3%80%90wordpress%e3%80%91%e7%94%bb%e9%9d%a2%e4%b8%8a%e3%81%ae%e5%9b%ba%e5%ae%9a%e8%a1%a8%e7%a4%ba%e3%83%91%e3%83%bc%e3%83%84%e3%82%92%e3%83%97%e3%83%a9%e3%82%b0%e3%82%a4%e3%83%b3%e3%81%a7\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-2128","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"views":541,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/posts\/2128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/comments?post=2128"}],"version-history":[{"count":17,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/posts\/2128\/revisions"}],"predecessor-version":[{"id":2146,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/posts\/2128\/revisions\/2146"}],"wp:attachment":[{"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/media?parent=2128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/categories?post=2128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/tags?post=2128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}