{"id":1419,"date":"2017-05-19T22:14:04","date_gmt":"2017-05-19T13:14:04","guid":{"rendered":"http:\/\/www.clarenet.co.jp\/column\/engineer\/?p=701"},"modified":"2017-05-19T22:14:04","modified_gmt":"2017-05-19T13:14:04","slug":"%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e6%8a%95%e7%a8%bf%e3%81%ab%e3%82%bf%e3%82%af%e3%82%bd%e3%83%8e%e3%83%9f%e3%83%bc%e3%81%ae%e8%a1%a8%e7%a4%ba%e5%88%97%e3%81%a8%e7%b5%9e%e3%82%8a%e8%be%bc%e3%81%bf","status":"publish","type":"post","link":"https:\/\/4koma-web.com\/coding\/%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e6%8a%95%e7%a8%bf%e3%81%ab%e3%82%bf%e3%82%af%e3%82%bd%e3%83%8e%e3%83%9f%e3%83%bc%e3%81%ae%e8%a1%a8%e7%a4%ba%e5%88%97%e3%81%a8%e7%b5%9e%e3%82%8a%e8%be%bc%e3%81%bf\/","title":{"rendered":"\u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u306b\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u306e\u8868\u793a\u5217\u3068\u7d5e\u308a\u8fbc\u307f\u3092\u8ffd\u52a0"},"content":{"rendered":"<p>\u8ffd\u52a0\u3057\u305f\u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u306e\u4e00\u89a7\u306b\u3001\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u30bf\u30fc\u30e0\u540d\uff08\u30ab\u30c6\u30b4\u30ea\u30fc\u540d\uff09\u3068\u7d5e\u308a\u8fbc\u307f\u691c\u7d22\u3092\u8ffd\u52a0\u3059\u308b\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true \" >\/**\n * \u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u4e00\u89a7\u306b\u5217\u8ffd\u52a0\n *\n *\/\nfunction add_custom_column( $defaults ) {\n$defaults['\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u540d'] = '\u30ab\u30c6\u30b4\u30ea\u30fc';\nreturn $defaults;\n}\nadd_filter('manage_posts_columns', 'add_custom_column');\n\n\n\/**\n * \u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u4e00\u89a7\u306b\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u306e\u30bf\u30fc\u30e0\u3092\u8868\u793a\n *\n *\/\nfunction add_custom_column_id($column_name, $id) {\nif( $column_name == '\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u540d' ) {\necho get_the_term_list($id, '\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u540d', '', ', ');\n}\n}\nadd_action('manage_posts_custom_column', 'add_custom_column_id', 10, 2);\n\n\n\/**\n * \u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u4e00\u89a7\u306b\u30bf\u30fc\u30e0\u3067\u7d5e\u308a\u8fbc\u3080\u30d7\u30eb\u30c0\u30a6\u30f3\u30ea\u30b9\u30c8\u3092\u8868\u793a\uff08\uff13\u968e\u5c64\u307e\u3067\uff09\n *\n *\/\nfunction add_post_taxonomy_restrict_filter() {\n    global $post_type;\n    if ( 'experience' == $post_type ) {\n        echo '&lt;select name=\"experience-cat\"&gt;';\n            echo '&lt;option value=\"\"&gt;\u30ab\u30c6\u30b4\u30ea\u30fc\u6307\u5b9a\u306a\u3057&lt;\/option&gt;';\n            $terms = get_terms('\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u540d', 'hide_empty=0');\n            foreach ($terms as $term) :\n             if ($term-&gt;parent == 0):\n              echo '&lt;option value=\"' . $term-&gt;slug . '\"&gt;' . $term-&gt;name . '&lt;\/option&gt;';\n              $parentID = $term-&gt;term_id;\n \n              $children = get_terms( '\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u540d','hierarchical=1&amp;parent='.$parentID );\n              if(!empty($children)):\n \n               foreach($children as $child):\n                echo '&lt;option value=\"' . $child-&gt;slug  . '\"&gt;\u3000' . $child-&gt;name . '&lt;\/option&gt;';\n                \n                $grandchildren = get_terms('experience-cat','hierarchical=0&amp;parent='.$child-&gt;term_id);\n      \n                  if(!empty($grandchildren)):         \n\n                    foreach ( $grandchildren  as $grandson ):\n                    echo '&lt;option value=\"' . $grandson-&gt;slug  . '\"&gt;\u3000\u3000' . $grandson-&gt;name . '&lt;\/option&gt;';\n\n                    endforeach;\n\n                  endif;\n      \n               endforeach;\n \n              endif;\n             endif;\n           endforeach;\n \n        echo '&lt;\/select&gt;';\n    }\n}\nadd_action( 'restrict_manage_posts', 'add_post_taxonomy_restrict_filter' );<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u8ffd\u52a0\u3057\u305f\u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u306e\u4e00\u89a7\u306b\u3001\u30bf\u30af\u30bd\u30ce\u30df\u30fc\u30bf\u30fc\u30e0\u540d\uff08\u30ab\u30c6\u30b4\u30ea\u30fc\u540d\uff09\u3068\u7d5e\u308a\u8fbc\u307f\u691c\u7d22\u3092\u8ffd\u52a0\u3059\u308b\u30b3\u30fc\u30c9\u3067\u3059\u3002 \/** * \u30ab\u30b9\u30bf\u30e0\u6295\u7a3f\u4e00\u89a7\u306b\u5217\u8ffd\u52a0 * *\/ function add_custom_column( $defau [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":612,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"","_original_post":"","footnotes":""},"categories":[1],"tags":[],"publishpress_future_action":{"enabled":false,"date":"2026-04-21 20:35:25","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"category"},"_links":{"self":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/posts\/1419"}],"collection":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/comments?post=1419"}],"version-history":[{"count":0,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/posts\/1419\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/media\/612"}],"wp:attachment":[{"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/media?parent=1419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/categories?post=1419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/4koma-web.com\/coding\/wp-json\/wp\/v2\/tags?post=1419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}