{"id":22778,"date":"2020-02-08T10:29:57","date_gmt":"2020-02-08T02:29:57","guid":{"rendered":"http:\/\/4563.org\/?p=22778"},"modified":"2020-02-08T10:29:57","modified_gmt":"2020-02-08T02:29:57","slug":"wordpress-%e8%af%84%e8%ae%ba%e5%90%8e%e5%8f%af%e8%a7%81-%e6%9c%89%e4%ba%ba%e8%83%bd%e5%81%9a%e5%90%97%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=22778","title":{"rendered":"wordpress \u8bc4\u8bba\u540e\u53ef\u89c1 \u6709\u4eba\u80fd\u505a\u5417\uff1f"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>zzz123<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>wordpress \u8bc4\u8bba\u540e\u53ef\u89c1 \u6709\u4eba\u80fd\u505a\u5417\uff1f<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 zzz123 \u4e8e 2020-2-8 01:08 \u7f16\u8f91 <\/p>\n<p> \u5e2e\u4eba\u505a\u4e00\u4e2a\u7ad9\uff0c\u9700\u8981\u4e00\u4e2a \u8bc4\u8bba\u540e\u53ef\u89c1\u7684\u529f\u80fd\uff0c\u7f51\u4e0a\u597d\u591a\u73b0\u6210\u7684\u4ee3\u7801\u90fd\u4e0d\u652f\u6301php7.0\uff0c\u8bf7\u95ee\u6709\u4eba\u80fd\u505a\u5417\uff1f<\/p>\n<p>  \u9700\u6c42\uff1a\u8bc4\u8bba\u540e\u5237\u65b0\u6587\u7ae0\u53ef\u4ee5\u67e5\u770b\u9690\u85cf\u5185\u5bb9<\/p>\n<p>  \u73af\u5883\uff1a<br \/>  linux\u3001apache2.4\u3001php7.0redis+opcache<\/p>\n<p>  \u4e3b\u9898\uff1ajustnews<\/p>\n<p>  \u4ef7\u683c\uff1a<br \/>  \u79c1\u804apm\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>30826<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5176\u5b9e\u627e\u4e2a\u73b0\u6210\u7684\u63d2\u4ef6\uff0c\u627e\u4e2a\u4f1a\u6539\u4ee3\u7801\u7684\u76f4\u63a5\u6539\u4e0b\u5c31\u80fd\u517c\u5bb9\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>nutterchen<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  function reply_to_read($atts, $content=null) {&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;extract(shortcode_atts(array(&quot;notice&quot; =&gt; &#8216;&lt;div class=&quot;post-restrict-area border border-light border-2 rounded text-center has-very-light-gray-background-color py-4 py-md-5 mb-3&quot;&gt;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;div class=&quot;restrict-text text-sm text-secondary&quot;&gt;\u6b64\u5904\u5185\u5bb9\u5df2\u9690\u85cf\uff0c\u8bc4\u8bba\u540e\u5237\u65b0\u53ef\u89c1&lt;\/div&gt;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;div class=&quot;restrict-action mt-3 &quot;&gt;&lt;a href=&quot;#comments&quot; class=&quot;btn btn-primary&quot;&gt;\u7acb\u5373\u8bc4\u8bba\uff0c\u9605\u8bfb\u5168\u6587&lt;\/a&gt;&lt;\/div&gt;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&lt;\/div&gt;&#8217;), $atts));&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;$email = null;&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;$user_ID = (int) wp_get_current_user()-&gt;ID;&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;if ($user_ID &gt; 0) {&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$email = get_userdata($user_ID)-&gt;user_email;&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;\/\/\u5bf9\u535a\u4e3b\u76f4\u63a5\u663e\u793a\u5185\u5bb9&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$admin_email = &quot;XXXXXX@qq.com&quot;; \/\/\u535a\u4e3bEmail&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if ($email == $admin_email) {&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; return $content;&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;}&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;} else if (isset($_COOKIE[&#8216;comment_author_email_&#8217; . COOKIEHASH])) {&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$email = str_replace(&#8216;%40&#8217;, &#8216;@&#8217;, $_COOKIE[&#8216;comment_author_email_&#8217; . COOKIEHASH]);&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;} else {&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;return $notice;&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;}&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;if (empty($email)) {&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;return $notice;&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;}&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;global $wpdb;&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;$post_id = get_the_ID();&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;$query = &quot;SELECT `comment_ID` FROM {$wpdb-&gt;comments} WHERE `comment_post_ID`={$post_id} and `comment_approved`=&#8217;1&#8242; and `comment_author_email`='{$email}&#8217; LIMIT 1&quot;;&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;if ($wpdb-&gt;get_results($query)) {&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;return do_shortcode($content);&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;} else {&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;return $notice;&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;}&nbsp; &nbsp;<br \/>  &nbsp; &nbsp; }&nbsp; &nbsp;<br \/>  &nbsp; &nbsp; <br \/>  &nbsp; &nbsp; add_shortcode(&#8216;reply&#8217;, &#8216;reply_to_read&#8217;);\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>zzz123<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tnutterchen \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-2-8 01:14<br \/>  function reply_to_read($atts, $content=null) {&nbsp; &nbsp;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;extract(shortcode_atts(array(&quot;notice&quot; =&gt;&#8230;<\/p>\n<p> \u8fd9\u4e2a\u8bd5\u8fc7\u4e86<br \/>  } else if (isset($_COOKIE[&#8216;comment_author_email_&#8217; . COOKIEHASH])) {&nbsp; &nbsp;<br \/>  \u62a5\u9519\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>yjlml<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u73b0\u6210\u7684\u63d2\u4ef6\u5f88\u591a \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>zzz123<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tyjlml \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-2-8 01:16<br \/>  \u73b0\u6210\u7684\u63d2\u4ef6\u5f88\u591a<\/p>\n<p> \u90fd\u4e0d\u517c\u5bb9php7.0\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>nutterchen<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tzzz123 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-2-7 20:16<br \/>  \u8fd9\u4e2a\u8bd5\u8fc7\u4e86<br \/>  } else if (isset($_COOKIE[&#8216;comment_author_email_&#8217; . COOKIEHASH])) {&nbsp; &nbsp;<br \/>  \u62a5\u9519<\/p>\n<p> \u8be6\u7ec6\u70b9\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>zzz123<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tnutterchen \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-2-8 01:17<br \/>  \u8be6\u7ec6\u70b9<\/p>\n<p> \u8001\u54e5\u4f60\u8fd9\u4e2a\u8c8c\u4f3c\u6ca1\u62a5\u9519\uff0c\u7f51\u4e0a\u6709\u4e2a\u548c\u4f60\u76f8\u8fd1\u7684\u4ee3\u7801\u8fd0\u884c\u8d77\u4f1a\u62a5\u9519\uff0c\u660e\u5929\u6211\u518d\u6d4b\u8bd5\u4e00\u4e0b\uff0c\u5148\u8c22\u8c22\u8001\u54e5\u4f60\u4e86\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>zzz123 \u5927\u4f6c\u6709\u8bdd\u8bf4 : wo&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\/22778"}],"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=22778"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/22778\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=22778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=22778"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=22778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}