{"id":5934,"date":"2020-07-04T22:17:32","date_gmt":"2020-07-04T13:17:32","guid":{"rendered":"https:\/\/nsme.red\/wp\/?p=5934"},"modified":"2020-09-16T16:22:39","modified_gmt":"2020-09-16T07:22:39","slug":"%e3%83%a6%e3%83%bc%e3%82%b6%e3%83%bc%e6%83%85%e5%a0%b1","status":"publish","type":"post","link":"https:\/\/core.nsme.net\/notes\/wordpress\/%e9%96%a2%e6%95%b0-wordpress\/5934\/","title":{"rendered":"\u30e6\u30fc\u30b6\u30fc\u60c5\u5831"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">\u30e6\u30fc\u30b6\u30fc\u30ed\u30b0\u30a4\u30f3\u540d\u304b\u3089\u30e6\u30fc\u30b6\u30fcID\u3092\u53d6\u5f97<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>$staff_data = get_user_by( 'login', $slug );\n$staff_id = $staff_data->ID;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u3092\u53d6\u5f97<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">$current_user= wp_get_current_user( );&nbsp;<br>$username = $current_user-&gt;user_login;<br>&nbsp;$userdisname= $current_user-&gt;display_name ;<br>&nbsp;$user_id = $current_user-&gt;ID;<br>&nbsp;$user_roles = $current_user-&gt;roles;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u306f\u975e\u63a8\u5968\u306b\u306a\u3063\u305f\u305f\u3081\u3001<strong>wp_get_current_user( )<\/strong>\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\uff01\uff01<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">get_currentuserinfo();<br>$username= $current_user-&gt;user_login ;<br>$user_id = $current_user-&gt;ID;<br>$user_dis_name = $current_user-&gt;display_name;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30e6\u30fc\u30b6\u30fc\u30ed\u30b0\u30a4\u30f3\u540d\u304b\u3089\u30e6\u30fc\u30b6\u30fcID\u3092\u53d6\u5f97 \u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u3092\u53d6\u5f97 $current_user= wp_get_current_user( );&nbsp;$username = $current_user-&gt;user_ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[31],"tags":[],"class_list":["post-5934","post","type-post","status-publish","format-standard","hentry","category--wordpress"],"acf":[],"_links":{"self":[{"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/posts\/5934","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/comments?post=5934"}],"version-history":[{"count":2,"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/posts\/5934\/revisions"}],"predecessor-version":[{"id":6059,"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/posts\/5934\/revisions\/6059"}],"wp:attachment":[{"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/media?parent=5934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/categories?post=5934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/core.nsme.net\/notes\/wp-json\/wp\/v2\/tags?post=5934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}