{"id":516,"date":"2017-08-26T21:16:14","date_gmt":"2017-08-26T12:16:14","guid":{"rendered":"http:\/\/www.dogrow.net\/php\/?p=516"},"modified":"2018-08-25T22:26:43","modified_gmt":"2018-08-25T13:26:43","slug":"blog22","status":"publish","type":"post","link":"https:\/\/www.dogrow.net\/php\/blog22\/","title":{"rendered":"(22) \u3010WORDPRESS\u3011\u81ea\u4f5c\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3092\u30d7\u30e9\u30b0\u30a4\u30f3\u767b\u9332"},"content":{"rendered":"<p>\u8a73\u7d30\u306f\u4ee5\u4e0b\u306e\u516c\u5f0f\u30da\u30fc\u30b8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\nWordPress Codex\uff1a<a href=\"\/\/wpdocs.osdn.jp\/%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3%E3%81%AE%E4%BD%9C%E6%88%90\" target=_blank>\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4f5c\u6210\u624b\u9806<\/a><br \/>\nWordPress Codex\uff1a<a href=\"\/\/wpdocs.osdn.jp\/%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3_API\" target=_blank>\u30d7\u30e9\u30b0\u30a4\u30f3API<\/a><br \/>\nWordPress Codex\uff1a<a href=\"\/\/wpdocs.osdn.jp\/PHP_%E3%82%B3%E3%83%BC%E3%83%87%E3%82%A3%E3%83%B3%E3%82%B0%E8%A6%8F%E7%B4%84\" target=_blank>PHP\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u898f\u7d04<\/a><\/p>\n<h1 class=my_h>\u25a0\u30d7\u30ed\u30b0\u30e9\u30e0<\/h1>\n<p>\u4ee5\u4e0b\u3001\u6700\u5c0f\u5f62\u306e\u5b9f\u88c5\u3067\u3059\u3002<br \/>\n\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3068\u3057\u3066\u30b5\u30a4\u30c9\u30d0\u30fc\u306b\u767b\u9332\u3059\u308b\u3068 \u300cHello world!\u300d \u3068\u8868\u793a\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<h3 class=my_h>simple_widget.php<\/h3>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;?php\r\n\/* Plugin Name: Simple widget *\/\r\nadd_action(&quot;widgets_init&quot;, function(){\r\n  return register_widget(&quot;SimpleWidget&quot;);\r\n});\r\nclass SimpleWidget extends WP_Widget {\r\n  function __construct() {\r\n    $widget_name = &quot;\u7df4\u7fd2\u7528\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8&quot;;\r\n    $widget_ops  = array(&quot;description&quot; =&gt; &quot;\u7df4\u7fd2\u7528\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3067\u3059\u3002&quot;);\r\n    parent::__construct(false, $widget_name, $widget_ops);\r\n  }\r\n  function form($instance) {\r\n  }\r\n  function update($new_instance, $old_instance) {\r\n      return $new_instance;\r\n  }\r\n  function widget($args, $instance) {\r\n    echo &quot;Hello world!&quot;;\r\n  }\r\n}\r\n<\/pre>\n<h1 class=my_h style=\"margin-top:0\">\u25a0\u30d7\u30e9\u30b0\u30a4\u30f3\u767b\u9332<\/h1>\n<h3 class=my_h>\uff08\uff11\uff09 \u307e\u305a\u3001\u4e0a\u8a18\u306e simple_widget.php \u3092ZIP\u30d5\u30a1\u30a4\u30eb\u5316\u3059\u308b\u3002<\/h3>\n<p><img decoding=\"async\" src=\"\/\/www.dogrow.net\/php\/wp-content\/uploads\/2017\/08\/Image2-1.png\" alt=\"\" class=\"my_img\" \/><\/p>\n<h3 class=my_h>\uff08\uff12\uff09 \u300c\u30d7\u30e9\u30b0\u30a4\u30f3\u300d\uff0d\u300c\u65b0\u898f\u8ffd\u52a0\u300d\u3067ZIP\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u3002<\/h3>\n<p><img decoding=\"async\" src=\"\/\/www.dogrow.net\/php\/wp-content\/uploads\/2017\/08\/Image4.png\" alt=\"\" class=\"my_img\" \/><\/p>\n<p>\u5f53\u7136\u6709\u52b9\u5316\u3057\u3066\u304a\u304f\u3002<br \/>\n<img decoding=\"async\" src=\"\/\/www.dogrow.net\/php\/wp-content\/uploads\/2017\/08\/Image6.png\" alt=\"\" class=\"my_img\" \/><\/p>\n<h1 class=my_h style=\"margin-top:0\">\u25a0\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3068\u3057\u3066\u4f7f\u3046<\/h1>\n<p>\u300c\u5916\u89b3\u300d\uff0d\u300c\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u300d\u306b\u300c\u7df4\u7fd2\u7528\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u300d\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002<br \/>\n\u3053\u308c\u3092\u30b5\u30a4\u30c9\u30d0\u30fc\u306e\u691c\u7d22\u7a93\u306e\u4e0b\u306b\u8a2d\u7f6e\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br \/>\n\u78ba\u304b\u306b SimpleWidget::widget() \u3067\u547d\u4ee4\u3057\u305f\u3068\u304a\u308a\u306b \u300cHello world!\u300d \u3068\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n<img decoding=\"async\" src=\"\/\/www.dogrow.net\/php\/wp-content\/uploads\/2017\/08\/Image9.png\" alt=\"\" class=\"my_img\" \/><\/p>\n<hr class=\"my_hr_bottom\">\n","protected":false},"excerpt":{"rendered":"<p>\u8a73\u7d30\u306f\u4ee5\u4e0b\u306e\u516c\u5f0f\u30da\u30fc\u30b8\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002 WordPress Codex\uff1a\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4f5c\u6210\u624b\u9806 WordPress Codex\uff1a\u30d7\u30e9\u30b0\u30a4\u30f3API WordPress Codex\uff1aPHP\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u898f\u7d04 \u25a0\u30d7\u30ed\u30b0\u30e9\u30e0 \u4ee5\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.dogrow.net\/php\/blog22\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-516","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"views":1961,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/posts\/516","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/comments?post=516"}],"version-history":[{"count":32,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/posts\/516\/revisions"}],"predecessor-version":[{"id":1593,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/posts\/516\/revisions\/1593"}],"wp:attachment":[{"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/media?parent=516"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/categories?post=516"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/tags?post=516"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}