{"id":119039,"date":"2025-10-28T12:32:34","date_gmt":"2025-10-28T03:32:34","guid":{"rendered":"https:\/\/www.hiro-clinic.or.jp\/nipt\/test\/"},"modified":"2025-10-28T12:32:34","modified_gmt":"2025-10-28T03:32:34","slug":"test","status":"publish","type":"page","link":"https:\/\/www.hiro-clinic.or.jp\/nipt\/test\/?lang=en","title":{"rendered":"Test"},"content":{"rendered":"\n<a href=\"#\" id=\"hiro-login-btn\">Login<\/a>\n\n\n\n<script>\ndocument.addEventListener('DOMContentLoaded', function () {\n  const loginBtn = document.getElementById('hiro-login-btn');\n  if (!loginBtn) return;\n\n  loginBtn.addEventListener('click', function (event) {\n    event.preventDefault();\n\n    const params = new URLSearchParams(window.location.search);\n    const langParam = params.get('lang') || 'ja';\n\n    const langMap = {\n      'en': 'en',\n      'zh-hans': 'zh-Hans',\n      'zh-hant': 'zh-Hant',\n      'ja': 'ja'\n    };\n    const i18nLocale = langMap[langParam] || 'ja';\n\n    \/\/ Detect localhost\n    const isLocal = location.hostname === 'localhost';\n    const sameSite = isLocal ? 'Lax' : 'None';\n    const secureFlag = isLocal ? '' : ';Secure';\n\n    \/\/ Set cookie\n    document.cookie = `i18n_locale=${i18nLocale};domain=.hiro-clinic.or.jp;path=\/;SameSite=${sameSite}${secureFlag}`;\n\n    \/\/ Redirect to login\n    setTimeout(() => {\n      window.location.href = 'https:\/\/mypage-nipt-reservation.hiro-clinic.or.jp\/login\/';\n    }, 200);\n  });\n});\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"Login","protected":false},"author":127,"featured_media":0,"parent":0,"menu_order":10,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-119039","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.hiro-clinic.or.jp\/nipt\/wp-json\/wp\/v2\/pages\/119039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hiro-clinic.or.jp\/nipt\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.hiro-clinic.or.jp\/nipt\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiro-clinic.or.jp\/nipt\/wp-json\/wp\/v2\/users\/127"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiro-clinic.or.jp\/nipt\/wp-json\/wp\/v2\/comments?post=119039"}],"version-history":[{"count":0,"href":"https:\/\/www.hiro-clinic.or.jp\/nipt\/wp-json\/wp\/v2\/pages\/119039\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hiro-clinic.or.jp\/nipt\/wp-json\/wp\/v2\/media?parent=119039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}