{"id":4900,"date":"2010-06-30T21:00:28","date_gmt":"2010-06-30T12:00:28","guid":{"rendered":"http:\/\/www.sssg.org\/blogs\/hiro345\/?p=4900"},"modified":"2011-05-01T08:57:53","modified_gmt":"2011-04-30T23:57:53","slug":"wordpress-hello-world-plugin","status":"publish","type":"post","link":"https:\/\/www.hiro345.net\/blogs\/hiro345\/archives\/4900.html","title":{"rendered":"WordPress Hello World Plugin"},"content":{"rendered":"<p>WordPress \u3067\u3001HelloWorld \u306e Plugin \u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u305f\u3002<!--more--><\/p>\n<p>\u6700\u521d\u306e\u65b9\u306b\u304a\u6c7a\u307e\u308a\u306e\u30b3\u30e1\u30f3\u30c8\u884c\u3092\u8a18\u8f09\u3057\u3066\u3001\u3042\u3068\u306ffunction\u3092\u5ba3\u8a00\u3057\u3066\u304b\u3089\u3001add_action\u3067\u767b\u9332\u3057\u3066\u3044\u307e\u3059\u3002\u5834\u6240\u306f admin_footer\u3002CSS\u3082\u6307\u5b9a\u3057\u3066\u3001admin_header \u3078 add_action \u3067\u767b\u9332\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305f\u3063\u305f\u3053\u308c\u3060\u3051\u3067\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u3067\u304d\u308b\u306e\u3067\u3001\u9a5a\u304d\u3067\u3059\u3002&#x24;WP_HOME&#x2f;wp&#x2d;content&#x2f;plugins&#x2f;HelloWorld.php \u3068\u3057\u3066\u4fdd\u5b58\u3057\u3001\u7ba1\u7406\u753b\u9762\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3067\u6709\u52b9\u5316\u3059\u308b\u3068\u3001\u7ba1\u7406\u753b\u9762\u4e0a\u306b Hello World \u3068\u3044\u3046\u6587\u5b57\u5217\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<div class=\"code\" style=\"overflow: scroll; width: 490px; white-space: nowrap;background-color:black;color:white;padding:4px;\">&#x24;&nbsp;cat&nbsp;&#x24;WP_HOME&#x2f;wp&#x2d;content&#x2f;plugins&#x2f;HelloWorld.php&nbsp;<br \/>\n&lt;?php<br \/>\n&#x2f;**<br \/>\n&nbsp;*&nbsp;&#x40;package&nbsp;HelloWorld<br \/>\n&nbsp;*&nbsp;&#x40;version&nbsp;0.0.1<br \/>\n&nbsp;*&#x2f;<br \/>\n&#x2f;*<br \/>\nPlugin&nbsp;Name&#x3a;&nbsp;HelloWorld<br \/>\nPlugin&nbsp;URI&#x3a;&nbsp;http&#x3a;&#x2f;&#x2f;www.sssg.org&#x2f;blogs&#x2f;hiro345&#x2f;HelloWorld<br \/>\nDescription&#x3a;&nbsp;Hello&nbsp;World&nbsp;Plugin<br \/>\nAuthor&#x3a;&nbsp;Hiroshi&nbsp;Koyama<br \/>\nVersion&#x3a;&nbsp;0.0.1<br \/>\nAuthor&nbsp;URI&#x3a;&nbsp;http&#x3a;&#x2f;&#x2f;www.sssg.org&#x2f;blogs&#x2f;hiro345&#x2f;<br \/>\n*&#x2f;<\/p>\n<p>function&nbsp;hello_message()&nbsp;{<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;&quot;&lt;p&nbsp;id=&#x27;helloworld&#x27;&gt;Hello&nbsp;World&lt;&#x2f;p&gt;&quot;&#x3b;<br \/>\n}<\/p>\n<p>add_action(&#x27;admin_footer&#x27;,&nbsp;&#x27;hello_message&#x27;)&#x3b;<\/p>\n<p>function&nbsp;hello_world_css()&nbsp;{<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&#x24;x&nbsp;=&nbsp;(&nbsp;is_rtl()&nbsp;)&nbsp;?&nbsp;&#x27;left&#x27;&nbsp;&#x3a;&nbsp;&#x27;right&#x27;&#x3b;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;&quot;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;style&nbsp;type=&#x27;text&#x2f;css&#x27;&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&#x23;helloworld&nbsp;{<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position&#x3a;&nbsp;absolute&#x3b;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;top&#x3a;&nbsp;4.5em&#x3b;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin&#x3a;&nbsp;0&#x3b;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding&#x3a;&nbsp;0&#x3b;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#x24;x&#x3a;&nbsp;215px&#x3b;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;font&#x2d;size&#x3a;&nbsp;11px&#x3b;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&lt;&#x2f;style&gt;<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&quot;&#x3b;<br \/>\n}<\/p>\n<p>add_action(&#x27;admin_head&#x27;,&nbsp;&#x27;hello_world_css&#x27;)&#x3b;<\/p>\n<p>?&gt;\n<\/p><\/div>\n<p>\u8a73\u3057\u304f\u306f\u3001\u3053\u3061\u3089\u3092\u53c2\u7167\u3059\u308b\u3068\u826f\u3055\u305d\u3046\u3067\u3059\u3002<br \/>\n<a href=\"http:\/\/codex.wordpress.org\/Writing_a_Plugin\">Writing a Plugin \u00ab WordPress Codex<\/a><br \/>\n<a href=\"http:\/\/codex.wordpress.org\/Plugin_API\">Plugin API \u00ab WordPress Codex<\/a><\/p>\n<p>WordPress\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306b\u8208\u5473\u306e\u3042\u308b\u65b9\u306f\u95a2\u9023\u66f8\u7c4d\u3092\u8aad\u3093\u3067\u307f\u308b\u3068\u3044\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<br \/>\n<!--more--><\/p>\n<p>\u95a2\u9023\u66f8\u7c4d\uff1a<br \/>\n<iframe src=\"\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hiro345-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=4883377245&#038;ref=tf_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><br \/>\n<iframe src=\"\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hiro345-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=4839935416&#038;ref=tf_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><br \/>\n<iframe src=\"\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hiro345-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=4797360887&#038;ref=tf_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><br \/>\n<iframe src=\"\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hiro345-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=4839936072&#038;ref=tf_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><br \/>\n<iframe src=\"\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hiro345-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=488337730X&#038;ref=tf_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress \u3067\u3001HelloWorld \u306e Plugin \u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[295,70,316],"class_list":["post-4900","post","type-post","status-publish","format-standard","hentry","category-linux","tag-php","tag-wordpress","tag-wordpress-plugin"],"_links":{"self":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/4900","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/comments?post=4900"}],"version-history":[{"count":5,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/4900\/revisions"}],"predecessor-version":[{"id":6651,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/4900\/revisions\/6651"}],"wp:attachment":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/media?parent=4900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/categories?post=4900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/tags?post=4900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}