{"id":2284,"date":"2025-02-16T14:14:11","date_gmt":"2025-02-16T05:14:11","guid":{"rendered":"https:\/\/prawn.mywire.org\/?p=2284"},"modified":"2025-03-04T09:50:38","modified_gmt":"2025-03-04T00:50:38","slug":"customize_comment_form","status":"publish","type":"post","link":"https:\/\/prawn.mywire.org\/en\/blog\/tech\/customize_comment_form\/","title":{"rendered":"WordPress comment form modification"},"content":{"rendered":"\n<div class=\"wp-block-columns vk_block-margin-md--margin-bottom is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column vk_block-margin-0--margin-bottom is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n<p>This site uses WordPress system  to manage contents.<\/p>\n\n\n\n<p>On article pages of this system, we can write comment for the article at a form that is displayed like the right (or following, if you uses smart phone) snapshot. Somehow, this form contains 'Website' field by default. But isn't this really necessary?<\/p>\n\n\n\n<p>On the other hand, the beginning message that says \"your email address is\u2026\" might  be requested to add a reference link to the privacy policy page if it is prepared.<\/p>\n\n\n\n<p>These are why I have started modification of the comment form. <\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column vk_block-margin-0--margin-bottom is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-vk-blocks-border-box vk_borderBox vk_borderBox-background-white vk_block-margin-0--margin-top is-style-vk_borderBox-style-solid-kado-tit-tab\"><div class=\"vk_borderBox_title_container\"><i class=\"\"><\/i><h4 class=\"vk_borderBox_title\">Standard comment form<\/h4><\/div><div class=\"vk_borderBox_body\">\n<div class=\"wp-block-vk-blocks-slider swiper swiper-container vk_slider vk_slider_b615d48d-6849-496c-a4bc-890ab68839a1 vk_block-margin-xs--margin-top vk_block-margin-xs--margin-bottom\" data-vkb-slider=\"{&quot;autoPlay&quot;:true,&quot;autoPlayStop&quot;:false,&quot;autoPlayDelay&quot;:1000,&quot;pagination&quot;:&quot;hide&quot;,&quot;blockId&quot;:&quot;b615d48d-6849-496c-a4bc-890ab68839a1&quot;,&quot;loop&quot;:true,&quot;effect&quot;:&quot;fade&quot;,&quot;speed&quot;:0,&quot;slidesPerViewMobile&quot;:1,&quot;slidesPerViewTablet&quot;:1,&quot;slidesPerViewPC&quot;:1,&quot;slidesPerGroup&quot;:&quot;one-by-one&quot;,&quot;centeredSlides&quot;:false}\"><div class=\"swiper-wrapper\">\n<div class=\"wp-block-vk-blocks-slider-item vk_slider_item swiper-slide vk_valign-center vk_slider_item-1077f3a6-7325-41f1-a6ad-e826856fe69a  is-layout-constrained vk_slider_item-paddingVertical-none\"><div class=\"vk_slider_item-background-area has-background-dim has-background-dim-5\" style=\"padding-left:0;padding-right:0\"><\/div><div class=\"vk_slider_item_container container\">\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"589\" height=\"511\" src=\"https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment1e.png\" alt=\"Comment form of standard WordPress\" class=\"wp-image-2225\" srcset=\"https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment1e.png 589w, https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment1e-300x260.png 300w, https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment1e-150x130.png 150w\" sizes=\"(max-width: 589px) 100vw, 589px\" \/><\/figure>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-vk-blocks-slider-item vk_slider_item swiper-slide vk_valign-center vk_slider_item-2d3207c0-05f3-4911-80f0-ed567386d3b9  is-layout-constrained vk_slider_item-paddingVertical-none\"><div class=\"vk_slider_item-background-area has-background-dim has-background-dim-5\" style=\"padding-left:0;padding-right:0\"><\/div><div class=\"vk_slider_item_container container\">\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"589\" height=\"511\" src=\"https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment1em.png\" alt=\"Points to be corrected on the standard comment form\" class=\"wp-image-2224\" srcset=\"https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment1em.png 589w, https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment1em-300x260.png 300w, https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment1em-150x130.png 150w\" sizes=\"(max-width: 589px) 100vw, 589px\" \/><\/figure>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n<p>Only hiding the 'Website' input item, we can do it easily by adding the following setting into the additional CSS setting in the WordPress customization.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#E6E6E6;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f2f2f;color:#d9d9d9\">CSS<\/span><span role=\"button\" tabindex=\"0\" data-code=\".comment-form-url{ display:none; }\" style=\"color:#E6E6E6;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki slack-dark\" style=\"background-color: #222222\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D7BA7D\">.comment-form-url<\/span><span style=\"color: #E6E6E6\">{ <\/span><span style=\"color: #9CDCFE\">display<\/span><span style=\"color: #E6E6E6\">:<\/span><span style=\"color: #CE9178\">none<\/span><span style=\"color: #E6E6E6\">; }<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"vk_block-margin-sm--margin-top\">However, even with this, the \"Save my name and ...\" message still contains 'website' word.<\/p>\n\n\n\n<p>Additionally, it seems impossible to tweak the message before or after the \"Your email address will not be\u2026\" only by adding some  CSS settings.<\/p>\n\n\n\n<p>So, I decided to take the plunge and fix the problem by modifying the code as I will explain later, which allowed me to create the form shown on the right (or below if you are viewing this on a smartphone).<\/p>\n\n\n\n<p><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-vk-blocks-border-box vk_borderBox vk_borderBox-background-white is-style-vk_borderBox-style-solid-kado-tit-tab\"><div class=\"vk_borderBox_title_container\"><i class=\"\"><\/i><h4 class=\"vk_borderBox_title\">Customized comment form<\/h4><\/div><div class=\"vk_borderBox_body\">\n<div class=\"wp-block-vk-blocks-slider swiper swiper-container vk_slider vk_slider_20287176-16a1-4bea-b1d6-162aec07d586 vk_block-margin-xs--margin-top vk_block-margin-xs--margin-bottom\" data-vkb-slider=\"{&quot;autoPlay&quot;:true,&quot;autoPlayStop&quot;:false,&quot;autoPlayDelay&quot;:1000,&quot;pagination&quot;:&quot;hide&quot;,&quot;blockId&quot;:&quot;20287176-16a1-4bea-b1d6-162aec07d586&quot;,&quot;loop&quot;:true,&quot;effect&quot;:&quot;fade&quot;,&quot;speed&quot;:0,&quot;slidesPerViewMobile&quot;:1,&quot;slidesPerViewTablet&quot;:1,&quot;slidesPerViewPC&quot;:1,&quot;slidesPerGroup&quot;:&quot;one-by-one&quot;,&quot;centeredSlides&quot;:false}\"><div class=\"swiper-wrapper\">\n<div class=\"wp-block-vk-blocks-slider-item vk_slider_item swiper-slide vk_valign-center vk_slider_item-3aefd3ca-534b-4a30-bd60-5f004d8edb14  is-layout-constrained vk_slider_item-paddingVertical-none\"><div class=\"vk_slider_item-background-area has-background-dim has-background-dim-5\" style=\"padding-left:0;padding-right:0\"><\/div><div class=\"vk_slider_item_container container\">\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"660\" height=\"547\" src=\"https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment2e.png\" alt=\"Revised comment form\" class=\"wp-image-2221\" style=\"width:756px;height:auto\" srcset=\"https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment2e.png 660w, https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment2e-300x249.png 300w, https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment2e-150x124.png 150w\" sizes=\"(max-width: 660px) 100vw, 660px\" \/><\/figure>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-vk-blocks-slider-item vk_slider_item swiper-slide vk_valign-center vk_slider_item-5f5c665a-083d-4f9c-9928-9cce98220de0  is-layout-constrained vk_slider_item-paddingVertical-none\"><div class=\"vk_slider_item-background-area has-background-dim has-background-dim-5\" style=\"padding-left:0;padding-right:0\"><\/div><div class=\"vk_slider_item_container container\">\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"660\" height=\"547\" src=\"https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment2em.png\" alt=\"Points corrected on revised comment form\" class=\"wp-image-2220\" style=\"width:755px;height:auto\" srcset=\"https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment2em.png 660w, https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment2em-300x249.png 300w, https:\/\/prawn.mywire.org\/wp-content\/uploads\/2025\/02\/comment2em-150x124.png 150w\" sizes=\"(max-width: 660px) 100vw, 660px\" \/><\/figure>\n<\/div><\/div>\n<\/div><\/div>\n<\/div><\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns vk_block-margin-sm--margin-top is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:30%\">\n<p><\/p>\n\n\n\n<p>On modification, we should not to modify original code of the WordPress in order to prepare for future updates of the WordPress system. So, the modifications are done on the child theme code which prepared separately. I had used 'add_filter()' function to add filter hook which applies additional feature to the original WordPress function.<\/p>\n\n\n\n<p>This time, I have added two filter hooks for the following WordPress functions:<\/p>\n\n\n\n<p>(1) comment_form_default_fields()<\/p>\n\n\n\n<p>Here, the 'Website' column is hidden regardless of the CSS settings, and the message of the \"Save my name...\" is modified according to the displayed language that can be identified by the get_locale() function.<\/p>\n\n\n\n<p>(2) comment_form_defaults()<\/p>\n\n\n\n<p>Here, the opening display message is modified according to the displayed language. <\/p>\n\n\n\n<p>Although I had tried to combine processes (1) and (2) into one of the functions, but that didn't seem possible, so I chose to do them separately.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#E6E6E6;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f2f2f;color:#d9d9d9\">PHP<\/span><span role=\"button\" tabindex=\"0\" data-code=\"add_filter('comment_form_default_fields', function($fields) {\n  \/\/ Hide 'website' input field.\n  unset($fields['url']); \n  \/\/ Remove web site from cookie message\n  $cookies = $fields['cookies'];\n  switch(get_locale()) {  \n    case 'ja': \/\/ Japanesen\n      $cookies = str_replace('\u3001\u30b5\u30a4\u30c8','',$cookies);\n      break;\n    case 'en_GB': \/\/ English\n      $cookies = str_replace(', email, and website',' and email',$cookies);\n      break;\n    default:\n      break;\n  }\n  $fields['cookies']=$cookies;\n  return $fields;\n});\n\nadd_filter('comment_form_defaults', function($fields) {\n  switch(get_locale()) {\n    case 'ja': \/\/ Japanese\n      $add_note = '\u3054\u8a18\u5165\u3044\u305f\u3060\u304f\u500b\u4eba\u60c5\u5831\u306e\u53d6\u308a\u6271\u3044\u306b\u3064\u3044\u3066\u306f&lt;a href=&quot;' . home_url('\/privacy-policy') . '&quot;&gt;\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u30dd\u30ea\u30b7\u30fc&lt;\/a&gt;\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002';\n      break;                                       \n    case 'en_GB': \/\/ English\n      $add_note = 'Regarding to handling of enterd personal information, refer &lt;a href=&quot;' . home_url('\/privacy-policy') . '&quot;&gt;Privacy Policy&lt;\/a&gt; page.';\n      break;\n    default:\n      break;\n  }\n  $dst_tag = '&lt;span id=&quot;email-notes&quot;&gt;';\n  $fields['comment_notes_before'] = str_replace($dst_tag, $dst_tag . $add_note . '&lt;\/br&gt;', $fields['comment_notes_before']) ;\n  return $fields;\n});\" style=\"color:#E6E6E6;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki slack-dark\" style=\"background-color: #222222\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">add_filter<\/span><span style=\"color: #E6E6E6\">(<\/span><span style=\"color: #CE9178\">&#39;comment_form_default_fields&#39;<\/span><span style=\"color: #E6E6E6\">, <\/span><span style=\"color: #569CD6\">function<\/span><span style=\"color: #E6E6E6\">(<\/span><span style=\"color: #9CDCFE\">$fields<\/span><span style=\"color: #E6E6E6\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">  <\/span><span style=\"color: #6A9955\">\/\/ Hide &#39;website&#39; input field.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">  <\/span><span style=\"color: #DCDCAA\">unset<\/span><span style=\"color: #E6E6E6\">(<\/span><span style=\"color: #9CDCFE\">$fields<\/span><span style=\"color: #E6E6E6\">[<\/span><span style=\"color: #CE9178\">&#39;url&#39;<\/span><span style=\"color: #E6E6E6\">]); <\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">  <\/span><span style=\"color: #6A9955\">\/\/ Remove web site from cookie message<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">  <\/span><span style=\"color: #9CDCFE\">$cookies<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #9CDCFE\">$fields<\/span><span style=\"color: #E6E6E6\">[<\/span><span style=\"color: #CE9178\">&#39;cookies&#39;<\/span><span style=\"color: #E6E6E6\">];<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">  <\/span><span style=\"color: #C586C0\">switch<\/span><span style=\"color: #E6E6E6\">(<\/span><span style=\"color: #DCDCAA\">get_locale<\/span><span style=\"color: #E6E6E6\">()) {  <\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">    <\/span><span style=\"color: #C586C0\">case<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #CE9178\">&#39;ja&#39;<\/span><span style=\"color: #E6E6E6\">: <\/span><span style=\"color: #6A9955\">\/\/ Japanesen<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">      <\/span><span style=\"color: #9CDCFE\">$cookies<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #DCDCAA\">str_replace<\/span><span style=\"color: #E6E6E6\">(<\/span><span style=\"color: #CE9178\">&#39;\u3001\u30b5\u30a4\u30c8&#39;<\/span><span style=\"color: #E6E6E6\">,<\/span><span style=\"color: #CE9178\">&#39;&#39;<\/span><span style=\"color: #E6E6E6\">,<\/span><span style=\"color: #9CDCFE\">$cookies<\/span><span style=\"color: #E6E6E6\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">      <\/span><span style=\"color: #C586C0\">break<\/span><span style=\"color: #E6E6E6\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">    <\/span><span style=\"color: #C586C0\">case<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #CE9178\">&#39;en_GB&#39;<\/span><span style=\"color: #E6E6E6\">: <\/span><span style=\"color: #6A9955\">\/\/ English<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">      <\/span><span style=\"color: #9CDCFE\">$cookies<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #DCDCAA\">str_replace<\/span><span style=\"color: #E6E6E6\">(<\/span><span style=\"color: #CE9178\">&#39;, email, and website&#39;<\/span><span style=\"color: #E6E6E6\">,<\/span><span style=\"color: #CE9178\">&#39; and email&#39;<\/span><span style=\"color: #E6E6E6\">,<\/span><span style=\"color: #9CDCFE\">$cookies<\/span><span style=\"color: #E6E6E6\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">      <\/span><span style=\"color: #C586C0\">break<\/span><span style=\"color: #E6E6E6\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">    <\/span><span style=\"color: #C586C0\">default<\/span><span style=\"color: #E6E6E6\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">      <\/span><span style=\"color: #C586C0\">break<\/span><span style=\"color: #E6E6E6\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">  <\/span><span style=\"color: #9CDCFE\">$fields<\/span><span style=\"color: #E6E6E6\">[<\/span><span style=\"color: #CE9178\">&#39;cookies&#39;<\/span><span style=\"color: #E6E6E6\">]<\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #9CDCFE\">$cookies<\/span><span style=\"color: #E6E6E6\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">  <\/span><span style=\"color: #C586C0\">return<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #9CDCFE\">$fields<\/span><span style=\"color: #E6E6E6\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">});<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">add_filter<\/span><span style=\"color: #E6E6E6\">(<\/span><span style=\"color: #CE9178\">&#39;comment_form_defaults&#39;<\/span><span style=\"color: #E6E6E6\">, <\/span><span style=\"color: #569CD6\">function<\/span><span style=\"color: #E6E6E6\">(<\/span><span style=\"color: #9CDCFE\">$fields<\/span><span style=\"color: #E6E6E6\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">  <\/span><span style=\"color: #C586C0\">switch<\/span><span style=\"color: #E6E6E6\">(<\/span><span style=\"color: #DCDCAA\">get_locale<\/span><span style=\"color: #E6E6E6\">()) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">    <\/span><span style=\"color: #C586C0\">case<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #CE9178\">&#39;ja&#39;<\/span><span style=\"color: #E6E6E6\">: <\/span><span style=\"color: #6A9955\">\/\/ Japanese<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">      <\/span><span style=\"color: #9CDCFE\">$add_note<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #CE9178\">&#39;\u3054\u8a18\u5165\u3044\u305f\u3060\u304f\u500b\u4eba\u60c5\u5831\u306e\u53d6\u308a\u6271\u3044\u306b\u3064\u3044\u3066\u306f&lt;a href=&quot;&#39;<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #DCDCAA\">home_url<\/span><span style=\"color: #E6E6E6\">(<\/span><span style=\"color: #CE9178\">&#39;\/privacy-policy&#39;<\/span><span style=\"color: #E6E6E6\">) <\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #CE9178\">&#39;&quot;&gt;\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u30dd\u30ea\u30b7\u30fc&lt;\/a&gt;\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002&#39;<\/span><span style=\"color: #E6E6E6\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">      <\/span><span style=\"color: #C586C0\">break<\/span><span style=\"color: #E6E6E6\">;                                       <\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">    <\/span><span style=\"color: #C586C0\">case<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #CE9178\">&#39;en_GB&#39;<\/span><span style=\"color: #E6E6E6\">: <\/span><span style=\"color: #6A9955\">\/\/ English<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">      <\/span><span style=\"color: #9CDCFE\">$add_note<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #CE9178\">&#39;Regarding to handling of enterd personal information, refer &lt;a href=&quot;&#39;<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #DCDCAA\">home_url<\/span><span style=\"color: #E6E6E6\">(<\/span><span style=\"color: #CE9178\">&#39;\/privacy-policy&#39;<\/span><span style=\"color: #E6E6E6\">) <\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #CE9178\">&#39;&quot;&gt;Privacy Policy&lt;\/a&gt; page.&#39;<\/span><span style=\"color: #E6E6E6\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">      <\/span><span style=\"color: #C586C0\">break<\/span><span style=\"color: #E6E6E6\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">    <\/span><span style=\"color: #C586C0\">default<\/span><span style=\"color: #E6E6E6\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">      <\/span><span style=\"color: #C586C0\">break<\/span><span style=\"color: #E6E6E6\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">  }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">  <\/span><span style=\"color: #9CDCFE\">$dst_tag<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #CE9178\">&#39;&lt;span id=&quot;email-notes&quot;&gt;&#39;<\/span><span style=\"color: #E6E6E6\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">  <\/span><span style=\"color: #9CDCFE\">$fields<\/span><span style=\"color: #E6E6E6\">[<\/span><span style=\"color: #CE9178\">&#39;comment_notes_before&#39;<\/span><span style=\"color: #E6E6E6\">] <\/span><span style=\"color: #D4D4D4\">=<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #DCDCAA\">str_replace<\/span><span style=\"color: #E6E6E6\">(<\/span><span style=\"color: #9CDCFE\">$dst_tag<\/span><span style=\"color: #E6E6E6\">, <\/span><span style=\"color: #9CDCFE\">$dst_tag<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #9CDCFE\">$add_note<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #CE9178\">&#39;&lt;\/br&gt;&#39;<\/span><span style=\"color: #E6E6E6\">, <\/span><span style=\"color: #9CDCFE\">$fields<\/span><span style=\"color: #E6E6E6\">[<\/span><span style=\"color: #CE9178\">&#39;comment_notes_before&#39;<\/span><span style=\"color: #E6E6E6\">]) ;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">  <\/span><span style=\"color: #C586C0\">return<\/span><span style=\"color: #E6E6E6\"> <\/span><span style=\"color: #9CDCFE\">$fields<\/span><span style=\"color: #E6E6E6\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E6E6E6\">});<\/span><\/span><\/code><\/pre><\/div>\n<\/div>\n<\/div>\n\n\n\n<p class=\"vk_block-margin-sm--margin-top\">In the actual comment form of this site which will be displayed later, a character authentication function has been added to avoid spam posts.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This site uses WordPress system to manage contents. On article pages of this system, we can write comment for the article at a form that is displayed like the right (or following, if you uses smart phone) snapshot. Somehow, this form contains 'Website' field by default. But isn't this really necessary? On the other hand, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1473,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_GB","_original_post":"https:\/\/prawn.mywire.org\/?p=2203","sitemap_hide":"","_veu_custom_css":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[40],"tags":[49,46,48,50,43],"class_list":["post-2284","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech","tag-comment","tag-css","tag-customize","tag-filter-fook","tag-wordpress","en-GB"],"_links":{"self":[{"href":"https:\/\/prawn.mywire.org\/wp-json\/wp\/v2\/posts\/2284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prawn.mywire.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prawn.mywire.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prawn.mywire.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/prawn.mywire.org\/wp-json\/wp\/v2\/comments?post=2284"}],"version-history":[{"count":15,"href":"https:\/\/prawn.mywire.org\/wp-json\/wp\/v2\/posts\/2284\/revisions"}],"predecessor-version":[{"id":2335,"href":"https:\/\/prawn.mywire.org\/wp-json\/wp\/v2\/posts\/2284\/revisions\/2335"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prawn.mywire.org\/wp-json\/wp\/v2\/media\/1473"}],"wp:attachment":[{"href":"https:\/\/prawn.mywire.org\/wp-json\/wp\/v2\/media?parent=2284"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prawn.mywire.org\/wp-json\/wp\/v2\/categories?post=2284"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prawn.mywire.org\/wp-json\/wp\/v2\/tags?post=2284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}