{"id":33787,"date":"2020-02-16T22:03:09","date_gmt":"2020-02-16T14:03:09","guid":{"rendered":"http:\/\/4563.org\/?p=33787"},"modified":"2020-02-16T22:03:09","modified_gmt":"2020-02-16T14:03:09","slug":"%e4%bf%ae%e6%94%b9wordpress%e7%9a%84widget%ef%bc%8c%e9%80%bb%e8%be%91%e6%b7%b7%e4%b9%b1%e4%ba%86%e3%80%82%e6%80%bb%e8%a7%89%e5%be%97%e5%8f%af%e4%bb%a5%e4%bc%98%e5%8c%96%e3%80%82%e3%80%82%e3%80%82","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=33787","title":{"rendered":"\u4fee\u6539wordpress\u7684widget\uff0c\u903b\u8f91\u6df7\u4e71\u4e86\u3002\u603b\u89c9\u5f97\u53ef\u4ee5\u4f18\u5316\u3002\u3002\u3002"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>yaoruisheng<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-15 21:37:25\t<\/p>\n<h3>\u4fee\u6539wordpress\u7684widget\uff0c\u903b\u8f91\u6df7\u4e71\u4e86\u3002\u603b\u89c9\u5f97\u53ef\u4ee5\u4f18\u5316\u3002\u3002\u3002<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 yaoruisheng \u4e8e 2019-12-15 21:39 \u7f16\u8f91 <\/p>\n<p> global $wp_query;<br \/>  $args = $instance[&#8216;show_pagination&#8217;]?$wp_query-&gt;query_vars:array();<br \/>  if ($instance[&#8216;show_pagination&#8217;] || false === ( $wp_query = get_transient( &#8216;simpletext_recent_widget_&#8217; . $this-&gt;id ) ) ) {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; \/\/ Posts query arguments.<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; <br \/>  &nbsp; &nbsp; &nbsp; &nbsp; $args = array_replace($args ,array(<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8216;post_type&#8217;&nbsp; &nbsp;&nbsp; &nbsp;=&gt; &#8216;post&#8217;,<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8216;posts_per_page&#8217; =&gt; $instance[&#8216;limit&#8217;]<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; ));<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; \/\/ The post query<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; $wp_query = new WP_Query( $args );<\/p>\n<p>  &nbsp; &nbsp; &nbsp; &nbsp; \/\/ Store the transient.<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; if ( !$instance[&#8216;show_pagination&#8217;] ) set_transient( &#8216;simpletext_recent_widget_&#8217; . $this-&gt;id, $wp_query );<\/p>\n<p>  }  \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>rooney<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-15 21:41:24\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u8fd9\u5565\u5440\uff0c\u600e\u4e48\u8fd9\u4e48\u5570\u55e6\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>yaoruisheng<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-15 22:12:35\t<\/p>\n<h3><\/h3>\n<p>  \t\trooney \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-15 21:41<br \/>  \u8fd9\u5565\u5440\uff0c\u600e\u4e48\u8fd9\u4e48\u5570\u55e6<\/p>\n<p> \u5bf9\u554a\uff0c\u6211\u770b\u7740\u5c31\u662f\u5570\u55e6\uff0c\u4f46\u662f\u88ab\u5708\u4f4f\u4e86\uff0c\u770b\u4e0d\u51fa\u3002\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>yaoruisheng \u5927\u4f6c\u6709\u8bdd\u8bf4&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/33787"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=33787"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/33787\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33787"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}