{"id":1636,"date":"2013-03-23T11:11:52","date_gmt":"2013-03-23T03:11:52","guid":{"rendered":"https:\/\/sdeno.com\/?p=1636"},"modified":"2013-03-23T11:11:52","modified_gmt":"2013-03-23T03:11:52","slug":"wordpress%e6%95%99%e7%a8%8b%e5%9f%ba%e7%a1%80%e5%ad%a6%e4%b9%a0","status":"publish","type":"post","link":"https:\/\/sdeno.com\/?p=1636","title":{"rendered":"wordpress\u6559\u7a0b\u57fa\u7840\u5b66\u4e60"},"content":{"rendered":"<p>\u5728\u4f7f\u7528wordpress\u7f51\u7ad9\u5efa\u8bbe\u4e5f\u6709\u4e00\u6bb5\u65f6\u95f4\u4e86\uff0c\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u4e5f\u9047\u5230\u5404\u79cd\u529f\u80fd\u4e0a\u7684\u9700\u6c42\u4f46\u662f\u5bf9\u4e8e\u4e00\u4e9b\u4e0d\u61c2\u5199\u7a0b\u5e8f\u4ee3\u7801\u7684\u540c\u5b66\u6765\u8bf4\u60f3\u589e\u52a0\u4e00\u4e2a\u529f\u80fd\u6a21\u5757\u90a3\u662f\u4e0d\u53ef\u80fd\u72ec\u7acb\u5b8c\u6210\u7684\uff0c\u6240\u4ee5\u641c\u96c6\u4e86\u4e00\u4e9b\u5e38\u7528\u529f\u80fd\u81ea\u5df1\u4e5f\u5c31\u5f53\u505a\u4e2a\u5907\u5fd8\u5f55\u4e5f\u597d\uff0c\u540c\u65f6\u4e5f\u641c\u96c6\u4e00\u4e9bwordpress\u4f18\u5316\u4ee3\u7801\u8fd9\u6837\u53ef\u4ee5\u8ba9\u7a0b\u5e8f\u8fd0\u884c\u901f\u5ea6\u66f4\u5feb\u4e00\u4e9b\uff0c\u4e00\u76f4\u6ca1\u673a\u4f1a\u5199\u8fd9\u91cc\u4e13\u95e8\u62bd\u51fa\u65f6\u95f4\u6765\u5199\u6b64\u6587\u7ae0\uff0c\u8fd9\u91cc\u63a8\u8350\u65b0\u624b\u521a\u521a\u63a5\u89e6\u7684\u540c\u5b66\u4f7f\u7528\u3002<\/p>\n<h3>\u4e00\u3001wordpress\u7981\u6b62\u4fee\u8ba2\u529f\u80fd<\/h3>\n<p>\u8fd9\u4e2a\u529f\u80fd\u5c31\u662f\u8bb0\u5f55\u4e86\u4e00\u4e9b\u6587\u7ae0\u7f16\u8f91\u7684\u8bb0\u5f55\u5185\u5bb9\uff0c\u6bcf\u6b21\u7f16\u8f91\u4e00\u6b21\u6587\u7ae0\u90fd\u4f1a\u6709\u76f8\u5e94\u7684\u8bb0\u5f55\u5f88\u8d34\u5fc3\uff0c\u4f46\u662f\u672c\u4eba\u89c9\u5f97\u8fd9\u4e2a\u529f\u80fd\u5bf9\u6570\u636e\u5e93\u4f1a\u9020\u6210\u5197\u4f59\uff0c\u52a0\u4e0a\u65e5\u79ef\u6708\u7d2f\u6570\u636e\u5e93\u5c31\u8d8a\u6765\u8d8a\u5927\u9020\u6210\u6570\u636e\u5e93\u7684\u81c3\u80bf\uff0c\u6240\u4ee5\u6709\u5fc5\u8981\u7981\u7528\u6b64\u529f\u80fd\uff1a<br \/>\n1\uff0c\u6253\u5f00wp-includes\/default-filters.php\u6587\u4ef6\uff0c\u627e\u5230\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p>[code]add_action( &#8216;pre_post_update&#8217;, &#8216;wp_save_post_revision&#8217; );[\/code]<br \/>\n\u8fd9\u6bb5\u8bed\u53e5\u4e3b\u8981\u662f\u5728\u6bcf\u6b21\u66f4\u65b0\u6587\u7ae0\u65f6\uff0c\u8c03\u7528&#8217;pre_post_update&#8217; \u8fd9\u4e2a\u51fd\u6570\uff0c\u6765\u521b\u5efa\u4fee\u8ba2\u7248\uff0c\u6240\u4ee5\u5728\u8fd9\u6bb5\u8bed\u53e5\u524d\u6dfb\u52a0 &#8216;\/\/&#8217;<br \/>\n\u5c06\u5176\u8f6c\u4e3a\u6ce8\u91ca\uff0c\u8fd9\u6837\u5c31\u4e0d\u5fc5\u6267\u884c\u8fd9\u4e2a\u51fd\u6570\u4e86\u3002<br \/>\n[code]\/\/add_action( &#8216;pre_post_update&#8217;, &#8216;wp_save_post_revision&#8217; );[\/code]<br \/>\n2\uff0c\u6253\u5f00wp-admin\/includes\/post.php\u6587\u4ef6\uff0c\u627e\u5230\u4ee5\u4e0b\u4ee3\u7801\uff1a<br \/>\n[code]return _wp_put_post_revision( $_POST, true );[\/code]<br \/>\n\u4fee\u6539\u4e3a\uff1a<br \/>\n[code]return edit_post();[\/code]<br \/>\n\u8fd9\u6837\u4ee5\u540e\u6bcf\u6b21\u5728\u4fee\u6539\u5df2\u53d1\u5e03\u6587\u7ae0\u65f6\uff0c\u5c31\u4e0d\u518d\u4f1a\u51fa\u73b0\u4fee\u8ba2\u7248\u4e86\uff0c\u800c\u4e14\u4fdd\u7559\u4e86\u81ea\u52a8\u4fdd\u5b58\u8349\u7a3f\u7684\u529f\u80fd\u3002\u4e0d\u8fc7\u7f3a\u70b9\u5c31\u662f\uff0c\u6bcf\u6b21\u5347\u7ea7Wordpress\u90fd\u9700\u8981\u91cd\u65b0\u4fee\u6539\u3002<\/p>\n<h3>\u4e8c\u3001wordpress\u6700\u65b0\u8bc4\u8bba\u4ee3\u7801<\/h3>\n<p>\u5c31\u662f\u5728\u9996\u9875\u4fa7\u8fb9\u680f\u5904\u6dfb\u52a0\u6700\u65b0\u7684\u8bc4\u8bba\u53ef\u4ee5\u663e\u793a\u5728\u4e0a\u9762\uff0c\u8fd9\u4e2a\u5c0f\u7f16\u53d1\u73b0\u5f88\u591a\u4eba\u90fd\u5728\u4f7f\u7528\u6240\u4ee5\u5c31\u641c\u96c6\u8fc7\u6765\u4e86\u3002<\/p>\n<p>[code]&lt;h2&gt;Recent Comments&lt;\/h2&gt;<br \/>\n&lt;ul&gt;<br \/>\n&lt;?php<br \/>\nglobal $wpdb;<br \/>\n$sql = &#8220;SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author,<br \/>\ncomment_date_gmt, comment_approved, comment_type,comment_author_url,comment_author_email, SUBSTRING<br \/>\n(comment_content,1,16) AS com_excerpt FROM $wpdb-&gt;comments LEFT OUTER JOIN $wpdb-&gt;posts ON ($wpdb-<br \/>\n&gt;comments.comment_post_ID = $wpdb-&gt;posts.ID) WHERE comment_approved = &#8216;1&#8217; AND comment_type = &#8221; AND<br \/>\npost_password = &#8221; AND user_id=&#8217;0&#8242; ORDER BY comment_date_gmt DESC LIMIT 10&#8243;;<br \/>\n$comments = $wpdb-&gt;get_results($sql);<br \/>\n$output = $pre_HTML;<br \/>\nforeach ($comments as $comment) {$output .= &#8220;\\n&lt;li&gt;&#8221;.get_avatar(get_comment_author_email<br \/>\n(&#8216;comment_author_email&#8217;), 24).strip_tags($comment-&gt;comment_author).&#8221;:&lt;br \/&gt;&#8221; . &#8221; &lt;a href=\\&#8221;&#8221; .<br \/>\nget_permalink($comment-&gt;ID) .&#8221;#comment-&#8221; . $comment-&gt;comment_ID . &#8220;\\&#8221; title=\\&#8221;on &#8221; .$comment-<br \/>\n&gt;post_title . &#8220;\\&#8221;&gt;&#8221; . strip_tags($comment-&gt;com_excerpt).&#8221;&lt;\/a&gt;&#8230;&lt;\/li&gt;&#8221;;}<br \/>\n$output .= $post_HTML;<br \/>\necho $output;?&gt;<br \/>\n&lt;\/ul&gt;[\/code]<\/p>\n<p>\u8bf4\u660e\uff1acomment_content,1,16 \u4e2d\u768416\u662f\u6bcf\u4e2a\u7559\u8a00\u7684\u6587\u5b57\u6458\u53d6\u6570\u91cf\uff1b\u2026\u2026ORDER BY comment_date_gmt DESC LIMIT 10\u4e2d\u768410\u662f\u7559\u8a00\u6570\u91cf<\/p>\n<p>\u6700\u597d\u4e5f\u7528CSS\u4ee3\u7801\u7f8e\u5316\u4e00\u4e0b\uff1a<\/p>\n<p>[code]#sidebar img.avatar{float:left;position:relative;border:1px solid #ddd;padding:1px;margin-<br \/>\nright:5px;}[\/code]<\/p>\n<h3>\u4e09\u3001wordpress\u663e\u793a\u6700\u65b0\u6587\u7ae0\u52a8\u6001<\/h3>\n<p>\u8fd9\u4e2a\u529f\u80fd\u5f88\u6709\u5fc5\u8981\uff0c\u56e0\u4e3a\u6bcf\u6b21\u66f4\u65b0\u6587\u7ae0\u7684\u65f6\u5019\u968f\u65f6\u53ef\u4ee5\u8ba9\u8bbf\u95ee\u8005\u7b2c\u4e00\u65f6\u95f4\u5185\u5728\u9996\u9875\u4e2d\u770b\u5230\uff0c\u4e0d\u4ec5\u5982\u6b64\u8fd8\u6709\u5229\u6709wordpress\u7f51\u7ad9\u4f18\u5316\u3002<br \/>\n[code]&lt;ul class=&#8221;list&#8221;&gt;<br \/>\n&lt;?php query_posts(array(&#8216;posts_per_page&#8217; =&gt; 20,&#8217;caller_get_posts&#8217; =&gt;1,&#8217;orderby&#8217;<br \/>\n=&gt;date,));<br \/>\nwhile ( have_posts() ) : the_post(); ?&gt;<br \/>\n&lt;li&gt;&lt;span class=&#8221;contents&#8221;&gt;&lt;a href=&#8221;&lt;?php the_permalink() ?&gt;&#8221; rel=&#8221;bookmark&#8221; title=&#8221;&lt;?php the_title();<br \/>\n?&gt;&#8221;&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/span&gt;&lt;span class=&#8221;time&#8221;&gt;&lt;?php the_time(&#8216;m-d&#8217;); ?&gt;&lt;\/span&gt;&lt;\/li&gt;<br \/>\n&lt;?php endwhile;wp_reset_query();?&gt;<br \/>\n&lt;\/ul&gt;[\/code]<br \/>\n\u6dfb\u52a0\u5230\u9700\u8981\u663e\u793a\u7684\u5730\u65b9\u5373\u53ef\u3002<\/p>\n<h3>\u56db\u3001wordpress\u968f\u673a\u663e\u793a\u6587\u7ae0\u4ee3\u7801<\/h3>\n<p>\u8fd9\u4e2a\u529f\u80fd\u53ef\u4ee5\u6709\uff0c\u8fd9\u6837\u662f\u4e3a\u4e86\u8003\u8651\u4e00\u4e9b\u6587\u7ae0\u88ab\u6c89\u4e0b\u53bb\u7ed9\u8001\u6587\u7ae0\u6709\u663e\u793a\u5230\u9996\u9875\u7684\u673a\u4f1a\u6bcf\u6b21\u5237\u65b0\u90fd\u53ef\u4ee5\u968f\u673a\u663e\u793a\u51fa\u4e0d\u540c\u7684\u6587\u7ae0\uff0c\u4e5f\u9002\u7528\u4e8e\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<p>[code]&lt;ul class=&#8221;list&#8221;&gt;<br \/>\n&lt;?php query_posts(array(&#8216;posts_per_page&#8217; =&gt; 10,&#8217;caller_get_posts&#8217; =&gt;1,&#8217;orderby&#8217;<br \/>\n=&gt;rand,));<br \/>\nwhile ( have_posts() ) : the_post(); ?&gt;<br \/>\n&lt;li&gt;&lt;span class=&#8221;contents&#8221;&gt;&lt;a href=&#8221;&lt;?php the_permalink() ?&gt;&#8221; rel=&#8221;bookmark&#8221; title=&#8221;&lt;?php the_title();<br \/>\n?&gt;&#8221;&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/span&gt;&lt;span class=&#8221;time&#8221;&gt;&lt;?php the_time(&#8216;m-d&#8217;); ?&gt;&lt;\/span&gt;&lt;\/li&gt;<br \/>\n&lt;?php endwhile;wp_reset_query();?&gt;<br \/>\n&lt;\/ul&gt;[\/code]<\/p>\n<h3>\u4e94\u3001wordpress\u663e\u793a\u6700\u70ed\u6587\u7ae0\u4ee3\u7801<\/h3>\n<p>\u8fd9\u4e2a\u4ee3\u7801\u662f\u7ed1\u5b9a\u4e86\u8bc4\u8bba\u529f\u80fd\u7684\uff0c\u54ea\u7bc7\u6587\u7ae0\u8bc4\u8bba\u7684\u6b21\u6570\u591a\u5c31\u662f\u663e\u793a\u5728\u6b64\u6a21\u5757\u4e0a\u3002<\/p>\n<p>[code]&lt;ul class=&#8221;list&#8221;&gt;<br \/>\n&lt;?php query_posts(array(&#8216;posts_per_page&#8217; =&gt; 10,&#8217;caller_get_posts&#8217; =&gt;1,&#8217;orderby&#8217;<br \/>\n=&gt;comment_count,));<br \/>\nwhile ( have_posts() ) : the_post(); ?&gt;<br \/>\n&lt;li&gt;&lt;span class=&#8221;contents&#8221;&gt;&lt;a href=&#8221;&lt;?php the_permalink() ?&gt;&#8221; rel=&#8221;bookmark&#8221; title=&#8221;&lt;?php the_title();<br \/>\n?&gt;&#8221;&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/span&gt;&lt;span class=&#8221;time&#8221;&gt;&lt;?php the_time(&#8216;m-d&#8217;); ?&gt;&lt;\/span&gt;&lt;\/li&gt;<br \/>\n&lt;?php endwhile;wp_reset_query();?&gt;<br \/>\n&lt;\/ul&gt;[\/code]<\/p>\n<h3>\u516d\u3001wordpress\u663e\u793a\u672c\u6708\u8bc4\u8bba\u6700\u591a\u7684\u7f51\u53cb<\/h3>\n<p>\u8fd9\u91cc\u662f\u7edf\u8ba1\u51fa\u672c\u6708\u8bc4\u8bba\u6700\u591a\u7684\u7f51\u53cb\u4ee3\u7801\u5982\u4e0b \uff1a<\/p>\n<p>[code]&lt;?php \/\/\u672c\u6708\u8bc4\u8bba\u6700\u591a\u7684\u670b\u53cb<br \/>\n$identity=&#8221;comment_author&#8221;;<br \/>\n$passwordpost = &#8221; AND post_password=&#8221;&#8221;;<br \/>\n$userexclude = &#8221; AND user_id=&#8217;0&#8242;&#8221;;<br \/>\n$approved = &#8221; AND comment_approved=&#8217;1&#8242;&#8221;;<br \/>\n$interval = 30;<br \/>\n$shownumber = 12;<br \/>\n$counts = $wpdb-&gt;get_results(&#8220;SELECT COUNT(&#8221; . $identity . &#8220;) AS cnt, comment_author,<br \/>\ncomment_author_url,comment_author_email<br \/>\nFROM (SELECT * FROM $wpdb-&gt;comments LEFT OUTER JOIN $wpdb-&gt;posts<br \/>\nON ($wpdb-&gt;posts.ID=$wpdb-&gt;comments.comment_post_ID)<br \/>\nWHERE MONTH(comment_date)=MONTH(now()) and YEAR(comment_date)=YEAR(now())&#8221; .<br \/>\n$userexclude . $passwordpost . $approved . &#8220;) AS tempcmt<br \/>\nGROUP BY &#8221; . $identity . &#8221; ORDER BY cnt DESC LIMIT &#8221; . $shownumber); ?&gt;<br \/>\n&lt;h2&gt;\u672c\u6708\u6700\u6d3b\u8dc3\u7684\u670b\u53cb&lt;\/h2&gt;<br \/>\n&lt;ul class=&#8221;ffox_most_active&#8221;&gt;<br \/>\n&lt;?php if ( $counts ) : foreach ($counts as $count) :<br \/>\necho &#8216;&lt;li class=&#8221;mostactive&#8221;&gt;&#8217; . &#8216;&lt;a href=&#8221;&#8216;. $count-&gt;comment_author_url .<br \/>\n&#8216;&#8221; title=&#8221;&#8216; . $count-&gt;comment_author . &#8216; (&#8216;. $count-&gt;cnt . &#8216;\u8bc4\u8bba)&#8221;&gt;&#8217; .get_avatar($count-<br \/>\n&gt;comment_author_email,40).'&lt;\/a&gt;&lt;\/li&gt;&#8217;;<br \/>\nendforeach; endif;<br \/>\n?&gt;<br \/>\n&lt;\/ul&gt;[\/code]<br \/>\n\u8bf4\u660e\uff1a$shownumber \u662f\u663e\u793a\u7684\u8bc4\u8bba\u4f5c\u8005\u6570\u91cf\uff0c\u56e0\u4e3a\u6bcf\u5468\u7684\u7b97\u6cd5\u4e0d\u51c6\u786e\uff0c\u6240\u4ee5\u5176\u4ed6\u53c2\u6570\u5c31\u4e0d\u8bf4\u660e\u4e86\u3002<\/p>\n<h3>\u4e03\u3001wordpress\u4e0d\u540c\u9875\u9762\u663e\u793a\u4e0d\u540c\u7684\u6587\u7ae0\u6570\u91cf\u3002<\/h3>\n<p>\u8fd9\u4e2a\u529f\u80fd\u5f88\u5b9e\u7528\u53ef\u4ee5\u4e3a\u5206\u7c7b\u9875\u9762\u663e\u793a\u4e0d\u540c\u7684\u6587\u7ae0\u6570\u91cf\u3002<br \/>\n1\uff0c\u90a3\u4e48\u6253\u5f00\u4e3b\u9898\u6587\u4ef6 archive.php\uff0c\u627e\u5230\u4e0b\u9762\u8fd9\u53e5<br \/>\n[code]&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;[\/code]<br \/>\n\u4fee\u6539\u6210\uff1a<br \/>\n[code]&lt;?php $posts = query_posts($query_string . &#8216;&amp;orderby=date&amp;showposts=30&#8217;); ?&gt;&lt;!&#8211;\u63a7\u5236\u6587\u7ae0\u663e\u793a\u6570\u91cf<br \/>\n\uff0c30\u5373\u4e3a\u6587\u7ae0\u6570\u91cf&#8211;&gt;[\/code]<\/p>\n<h3>\u516b\u3001wordpress\u9632\u6b62\u5783\u573e\u7559\u8a00\u4fe1\u606f<\/h3>\n<p>\u8fd9\u91cc\u5f88\u591a\u4eba\u80af\u5b9a\u9700\u8981\u5230\u63d2\u4ef6\u6765\u5b9e\u73b0\u6b64\u529f\u80fd\u5176\u5b9e\u4e0d\u9700\u8981\u8fd9\u4e48\u9ebb\u70e6\u3002<br \/>\n\u5c06\u4e0b\u9762\u4ee3\u7801 copy \u5230 Function.php \u6700\u540e<br \/>\n[code]&lt;?php<\/p>\n<p>\/* &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>&lt;&lt;\u5c0f\u7246&gt;&gt; Anti-Spam v1.7 by Willin Kan.<\/p>\n<p>*\/<\/p>\n<p>\/\/\u5efa\u7acb<\/p>\n<p>class anti_spam {<\/p>\n<p>function anti_spam() {<\/p>\n<p>if (!current_user_can(&#8216;level_0&#8217;)) {<\/p>\n<p>add_action(&#8216;template_redirect&#8217;,array($this,&#8217;w_tb&#8217;),1);<\/p>\n<p>add_action(&#8216;init&#8217;,array($this,&#8217;gate&#8217;),1);<\/p>\n<p>add_action(&#8216;preprocess_comment&#8217;,array($this,&#8217;sink&#8217;),1); } }<\/p>\n<p>\/\/\u8a2d\u6b04\u4f4d<\/p>\n<p>function w_tb() {<\/p>\n<p>if (is_singular()) {<\/p>\n<p>ob_start(create_function(&#8216;$input&#8217;,&#8217;return preg_replace(&#8220;#textarea(.*?)name=([&#8220;&#8216;])comment([&#8220;&#8216;])(.+)<br \/>\n&lt;\/textarea&gt;#&#8221;,&#8221;textarea$1name=$2w$3$4&lt;\/textarea&gt;<\/p>\n<p>&lt;textarea name=&#8221;comment&#8221; cols=&#8221;100%&#8221; rows=&#8221;8&#8243; style=&#8221;position:absolute;top:-500px;&#8221;&gt;&lt;\/textarea&gt;&#8221;,<br \/>\n$input);&#8217;));<\/p>\n<p>} }<\/p>\n<p>\/\/\u6aa2\u67e5<\/p>\n<p>function gate() {<\/p>\n<p>if (isset($_POST[&#8216;w&#8217;]) &amp;&amp; !empty($_POST[&#8216;w&#8217;]) &amp;&amp; empty($_POST[&#8216;comment&#8217;])) {<\/p>\n<p>$_POST[&#8216;comment&#8217;]= $_POST[&#8216;w&#8217;];unset($_POST[&#8216;w&#8217;]);<\/p>\n<p>} else {$_POST[&#8216;spam_confirmed&#8217;] = 1;}<\/p>\n<p>}<\/p>\n<p>\/\/\u8655\u7406<\/p>\n<p>function sink($comment) {<\/p>\n<p>if (isset($_POST[&#8216;spam_confirmed&#8217;]) &amp;&amp; !empty($_POST[&#8216;spam_confirmed&#8217;])) {<\/p>\n<p>\/\/\u65b9\u6cd5\u4e00:\u76f4\u63a5\u64cb\u6389, \u5c07 die(); \u524d\u9762\u5169\u659c\u7dda\u522a\u9664\u5373\u53ef.<\/p>\n<p>\/\/die();<\/p>\n<p>\/\/\u65b9\u6cd5\u4e8c:\u6a19\u8a18\u70baspam, \u7559\u5728\u8cc7\u6599\u5eab\u6aa2\u67e5\u662f\u5426\u8aa4\u5224.<\/p>\n<p>add_filter(&#8216;pre_comment_approved&#8217;,create_function(&#8221;,&#8217;return &#8220;spam&#8221;;&#8217;));<\/p>\n<p>$is_ping = in_array($comment[&#8216;comment_type&#8217;], array(&#8216;pingback&#8217;, &#8216;trackback&#8217;));<\/p>\n<p>if ($is_ping) {<\/p>\n<p>$comment[&#8216;comment_content&#8217;] = &#8220;\u25ce \u9019\u662f Pingback\/Trackback, \u5c0f\u7246\u61f7\u7591\u9019\u53ef\u80fd\u662f Spam!n&#8221; .$comment<br \/>\n[&#8216;comment_content&#8217;];<\/p>\n<p>} else {<\/p>\n<p>$comment[&#8216;comment_content&#8217;] = &#8220;[ \u5c0f\u7246\u5224\u65b7\u9019\u662fSpam! ]n&#8221; .$comment[&#8216;comment_content&#8217;];<\/p>\n<p>}}<\/p>\n<p>return $comment;<\/p>\n<p>}}<\/p>\n<p>$anti_spam = new anti_spam();<\/p>\n<p>\/\/ &#8212; END &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>?&gt;[\/code]<br \/>\n\u4ee3\u7801\u7b80\u5355\u529f\u80fd\u5f3a\u5927\u3002<\/p>\n<h3>\u4e5d\u3001wordpress\u516c\u544a\u680f\u589e\u52a0<\/h3>\n<p>\u5982\u679c\u662f\u7528wordpress\u6765\u5b9e\u73b0\u4f01\u4e1a\u529f\u80fd\u7684\u8bdd\u8fd9\u529f\u80fd\u8fd8\u662f\u5f88\u5b9e\u7528\u7684\uff0c\u4e00\u822c\u516c\u53f8\u4f01\u4e1a\u90fd\u9700\u8981\u8fd9\u529f\u80fd\u3002<br \/>\n1. \u628a\u4e0b\u9762\u7684\u4ee3\u7801\u52a0\u5165\u6240\u7528\u4e3b\u9898\u7684 Function.php\uff0cmg12 \u7684\u4ee3\u7801\u91cc\u6709\u5927\u91cf\u6ce8\u91ca\uff0c\u6240\u4ee5\u4e0d\u7528\u6211\u591a\u8bf4\uff0c\u5982\u679c\u4f60\u53ea\u8981\u4e00\u4e2a\u516c\u544a\u529f\u80fd\u76f4\u63a5\u4f7f\u7528\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>[code]&lt;?php<\/p>\n<p>\/**<br \/>\n* \u9009\u9879\u7ec4\u7c7b\u578b<br \/>\n*\/<br \/>\nclass ClassicOptions {<\/p>\n<p>\/* &#8212; \u83b7\u53d6\u9009\u9879\u7ec4 &#8212; *\/<br \/>\nfunction getOptions() {<br \/>\n\/\/ \u5728\u6570\u636e\u5e93\u4e2d\u83b7\u53d6\u9009\u9879\u7ec4<br \/>\n$options = get_option(&#8216;classic_options&#8217;);<br \/>\n\/\/ \u5982\u679c\u6570\u636e\u5e93\u4e2d\u4e0d\u5b58\u5728\u8be5\u9009\u9879\u7ec4, \u8bbe\u5b9a\u8fd9\u4e9b\u9009\u9879\u7684\u9ed8\u8ba4\u503c, \u5e76\u5c06\u5b83\u4eec\u63d2\u5165\u6570\u636e\u5e93<br \/>\nif (!is_array($options)) {<br \/>\n$options[&#8216;notice&#8217;] = false;<br \/>\n$options[&#8216;notice_content&#8217;] = &#8221;;<br \/>\n\/\/ TODO: \u5728\u8fd9\u91cc\u8ffd\u52a0\u5176\u4ed6\u9009\u9879<br \/>\nupdate_option(&#8216;classic_options&#8217;, $options);<br \/>\n}<br \/>\n\/\/ \u8fd4\u56de\u9009\u9879\u7ec4<br \/>\nreturn $options;<br \/>\n}<\/p>\n<p>\/* &#8212; \u521d\u59cb\u5316 &#8212; *\/<br \/>\nfunction init() {<br \/>\n\/\/ \u5982\u679c\u662f POST \u63d0\u4ea4\u6570\u636e, \u5bf9\u6570\u636e\u8fdb\u884c\u9650\u5236, \u5e76\u66f4\u65b0\u5230\u6570\u636e\u5e93<br \/>\nif(isset($_POST[&#8216;classic_save&#8217;])) {<br \/>\n\/\/ \u83b7\u53d6\u9009\u9879\u7ec4, \u56e0\u4e3a\u6709\u53ef\u80fd\u53ea\u4fee\u6539\u90e8\u5206\u9009\u9879, \u6240\u4ee5\u5148\u6574\u4e2a\u62ff\u4e0b\u6765\u518d\u8fdb\u884c\u66f4\u6539<br \/>\n$options = ClassicOptions::getOptions();<\/p>\n<p>\/\/ \u6570\u636e\u9650\u5236<br \/>\nif ($_POST[&#8216;notice&#8217;]) {<br \/>\n$options[&#8216;notice&#8217;] = (bool)true;<br \/>\n} else {<br \/>\n$options[&#8216;notice&#8217;] = (bool)false;<br \/>\n}<br \/>\n$options[&#8216;notice_content&#8217;] = stripslashes($_POST[&#8216;notice_content&#8217;]);<\/p>\n<p>\/\/ TODO: \u5728\u8fd9\u8ffd\u52a0\u5176\u4ed6\u9009\u9879\u7684\u9650\u5236\u5904\u7406<\/p>\n<p>\/\/ \u66f4\u65b0\u6570\u636e<br \/>\nupdate_option(&#8216;classic_options&#8217;, $options);<\/p>\n<p>\/\/ \u5426\u5219, \u91cd\u65b0\u83b7\u53d6\u9009\u9879\u7ec4, \u4e5f\u5c31\u662f\u5bf9\u6570\u636e\u8fdb\u884c\u521d\u59cb\u5316<br \/>\n} else {<br \/>\nClassicOptions::getOptions();<br \/>\n}<\/p>\n<p>\/\/ \u5728\u540e\u53f0 Design \u9875\u9762\u8ffd\u52a0\u4e00\u4e2a\u6807\u7b7e\u9875, \u53eb Current Theme Options<br \/>\nadd_theme_page(&#8220;Current Theme Options&#8221;, &#8220;Current Theme Options&#8221;, &#8216;edit_themes&#8217;, basename(__FILE__),<br \/>\narray(&#8216;ClassicOptions&#8217;, &#8216;display&#8217;));<br \/>\n}<\/p>\n<p>\/* &#8212; \u6807\u7b7e\u9875 &#8212; *\/<br \/>\nfunction display() {<br \/>\n$options = ClassicOptions::getOptions();<br \/>\n?&gt;<\/p>\n<p>&lt;form action=&#8221;#&#8221; method=&#8221;post&#8221; enctype=&#8221;multipart\/form-data&#8221; name=&#8221;classic_form&#8221; id=&#8221;classic_form&#8221;&gt;<br \/>\n&lt;div class=&#8221;wrap&#8221;&gt;<br \/>\n&lt;h2&gt;&lt;?php _e(&#8216;Current Theme Options&#8217;, &#8216;classic&#8217;); ?&gt;&lt;\/h2&gt;<\/p>\n<p>&lt;!&#8211; \u516c\u544a\u680f &#8211;&gt;<br \/>\n&lt;table class=&#8221;form-table&#8221;&gt;<br \/>\n&lt;tbody&gt;<br \/>\n&lt;tr valign=&#8221;top&#8221;&gt;<br \/>\n&lt;th scope=&#8221;row&#8221;&gt;<br \/>\n&lt;?php _e(&#8216;Notice&#8217;, &#8216;classic&#8217;); ?&gt;<br \/>\n&lt;br\/&gt;<br \/>\n&lt;small style=&#8221;font-weight:normal;&#8221;&gt;&lt;?php _e(&#8216;HTML enabled&#8217;, &#8216;classic&#8217;) ?&gt;&lt;\/small&gt;<br \/>\n&lt;\/th&gt;<br \/>\n&lt;td&gt;<br \/>\n&lt;!&#8211; \u662f\u5426\u663e\u793a\u516c\u544a\u680f &#8211;&gt;<br \/>\n&lt;label&gt;<br \/>\n&lt;input name=&#8221;notice&#8221; type=&#8221;checkbox&#8221; value=&#8221;checkbox&#8221; &lt;?php if($options[&#8216;notice&#8217;]) echo<br \/>\n&#8220;checked=&#8217;checked'&#8221;; ?&gt; \/&gt;<br \/>\n&lt;?php _e(&#8216;Show notice.&#8217;, &#8216;classic&#8217;); ?&gt;<br \/>\n&lt;\/label&gt;<br \/>\n&lt;br\/&gt;<br \/>\n&lt;!&#8211; \u516c\u544a\u680f\u5185\u5bb9 &#8211;&gt;<br \/>\n&lt;label&gt;<br \/>\n&lt;textarea name=&#8221;notice_content&#8221; cols=&#8221;50&#8243; rows=&#8221;10&#8243; id=&#8221;notice_content&#8221; style=&#8221;width:98%;font-<br \/>\nsize:12px;&#8221; class=&#8221;code&#8221;&gt;&lt;?php echo($options[&#8216;notice_content&#8217;]); ?&gt;&lt;\/textarea&gt;<br \/>\n&lt;\/label&gt;<br \/>\n&lt;\/td&gt;<br \/>\n&lt;\/tr&gt;<br \/>\n&lt;\/tbody&gt;<br \/>\n&lt;\/table&gt;<\/p>\n<p>&lt;!&#8211; TODO: \u5728\u8fd9\u91cc\u8ffd\u52a0\u5176\u4ed6\u9009\u9879\u5185\u5bb9 &#8211;&gt;<\/p>\n<p>&lt;!&#8211; \u63d0\u4ea4\u6309\u94ae &#8211;&gt;<br \/>\n&lt;p class=&#8221;submit&#8221;&gt;<br \/>\n&lt;input type=&#8221;submit&#8221; name=&#8221;classic_save&#8221; value=&#8221;&lt;?php _e(&#8216;Update Options &amp;raquo;&#8217;, &#8216;classic&#8217;); ?&gt;&#8221; \/&gt;<br \/>\n&lt;\/p&gt;<br \/>\n&lt;\/div&gt;<\/p>\n<p>&lt;\/form&gt;<\/p>\n<p>&lt;?php<br \/>\n}<br \/>\n}<\/p>\n<p>\/**<br \/>\n* \u767b\u8bb0\u521d\u59cb\u5316\u65b9\u6cd5<br \/>\n*\/<br \/>\nadd_action(&#8216;admin_menu&#8217;, array(&#8216;ClassicOptions&#8217;, &#8216;init&#8217;));<\/p>\n<p>?&gt;[\/code]<br \/>\n2. \u8c03\u7528\u65b9\u6cd5\u76f4\u63a5\u5f15\u7528 mg12 \u539f\u8bdd\uff1a\u8981\u516c\u544a\u680f\u5728\u9996\u9875\u4e0a\u663e\u793a, \u9700\u8981\u4fee\u6539\u4e00\u4e0b index.php, \u8fd9\u4e2a\u6bd4\u8f83\u7b80\u5355, \u53ea\u662f\u901a\u8fc7\u4e00\u4e9b\u5224\u65ad\u8bed\u53e5\u51b3\u5b9a\u4e1c\u897f\u8981\u4e0d\u8981\u663e\u793a\u51fa\u6765\u800c\u5df2. \u5f53\u7136, \u4f60\u53ef\u4ee5\u8fdb\u884c\u5176\u4ed6\u64cd\u4f5c, \u5173\u952e\u662f\u83b7\u53d6\u5230\u9009\u9879\u7684\u503c, \u5e76\u5bf9\u5b83\u4eec\u8fdb\u884c\u5904\u7406\u3002<br \/>\n\u5176\u5b9e\u53ef\u4ee5\u5206\u4e3a\u4e24\u6b65\uff1a1. \u83b7\u53d6\u9009\u9879 (\u5bf9\u6bcf\u4e2a PHP \u6587\u4ef6, \u83b7\u53d6\u4e00\u6b21\u5c31\u884c\u4e86, \u53ef\u4ee5\u5728\u6587\u4ef6\u9876\u90e8\u6267\u884c) \uff1b2. \u5bf9\u9009\u9879\u8fdb\u884c\u5904\u7406\u00a0(\u8fd9\u91cc\u5224\u65ad\u6210\u7acb\u7684\u8bdd\u5c31\u5c06\u516c\u544a\u5185\u5bb9\u663e\u793a\u51fa\u6765)<\/p>\n<p>[code]&lt;!&#8211; \u83b7\u53d6\u9009\u9879 &#8211;&gt;<br \/>\n&lt;?php $options = get_option(&#8216;classic_options&#8217;); ?&gt;<\/p>\n<p>&lt;!&#8211; \u5982\u679c\u7528\u6237\u9009\u62e9\u663e\u793a\u516c\u544a\u680f, \u5e76\u4e14\u516c\u544a\u680f\u6709\u5185\u5bb9, \u5219\u663e\u793a\u51fa\u6765 &#8211;&gt;<br \/>\n&lt;?php if($options[&#8216;notice&#8217;] &amp;&amp; $options[&#8216;notice_content&#8217;]) : ?&gt;<br \/>\n&lt;div id=&#8221;notice&#8221;&gt;<br \/>\n&lt;div class=&#8221;content&#8221;&gt;&lt;?php echo($options[&#8216;notice_content&#8217;]); ?&gt;&lt;\/div&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;?php endif; ?&gt;[\/code]<br \/>\n\u8fd9\u6837\u5c31\u6709\u4e86\u4e00\u4e2a\u516c\u544a\u529f\u80fd\uff0c\u5728 wp \u540e\u53f0\u4e3b\u9898\u680f\u591a\u4e86\u4e00\u4e2a\u9009\u9879\uff0c\u5728\u91cc\u9762\u53ef\u4ee5\u6dfb\u52a0\u516c\u544a\u680f\u5185\u5bb9\u3002<\/p>\n<h3>\u5341\u3001wordpress\u8868\u60c5\u7b26\u53f7<\/h3>\n<p>\u8fd9\u662f\u6bd4\u8f83\u9002\u5408\u4e00\u4e9b\u4e3a\u81ea\u5df1\u7f51\u7ad9\u6dfb\u52a0\u4e2a\u6027\u7684\u7ad9\u957f\uff0c\u540c\u6837\u975e\u63d2\u4ef6\u5b9e\u73b0wordpress\u589e\u52a0\u8868\u60c5\u7b26\u53f7\u7684\u529f\u80fd\u3002<br \/>\n1\uff0c\u521b\u5efasmiley.php\u6587\u4ef6\u6dfb\u52a0\u4e00\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p>[code]&lt;script type=&#8221;text\/javascript&#8221; language=&#8221;javascript&#8221;&gt;<br \/>\n\/* &lt;![CDATA[ *\/<br \/>\nfunction grin(tag) {<br \/>\nvar myField;<br \/>\ntag = &#8216; &#8216; + tag + &#8216; &#8216;;<br \/>\nif (document.getElementById(&#8216;comment&#8217;) &amp;&amp; document.getElementById(&#8216;comment&#8217;).type == &#8216;textarea&#8217;) {<br \/>\nmyField = document.getElementById(&#8216;comment&#8217;);<br \/>\n} else {<br \/>\nreturn false;<br \/>\n}<br \/>\nif (document.selection) {<br \/>\nmyField.focus();<br \/>\nsel = document.selection.createRange();<br \/>\nsel.text = tag;<br \/>\nmyField.focus();<br \/>\n}<br \/>\nelse if (myField.selectionStart || myField.selectionStart == &#8216;0&#8217;) {<br \/>\nvar startPos = myField.selectionStart;<br \/>\nvar endPos = myField.selectionEnd;<br \/>\nvar cursorPos = endPos;<br \/>\nmyField.value = myField.value.substring(0, startPos)<br \/>\n+ tag<br \/>\n+ myField.value.substring(endPos, myField.value.length);<br \/>\ncursorPos += tag.length;<br \/>\nmyField.focus();<br \/>\nmyField.selectionStart = cursorPos;<br \/>\nmyField.selectionEnd = cursorPos;<br \/>\n}<br \/>\nelse {<br \/>\nmyField.value += tag;<br \/>\nmyField.focus();<br \/>\n}<br \/>\n}<br \/>\n\/* ]]&gt; *\/<br \/>\n&lt;\/script&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:?:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_question.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:razz:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_razz.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:sad:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_sad.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:evil:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_evil.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:!:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_exclaim.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:smile:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_smile.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:oops:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_redface.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:grin:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_biggrin.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:eek:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_surprised.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:shock:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_eek.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:???:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_confused.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:cool:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_cool.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:lol:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_lol.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:mad:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_mad.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:twisted:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_twisted.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:roll:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_rolleyes.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:wink:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_wink.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:idea:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_idea.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:arrow:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_arrow.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:neutral:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_neutral.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:cry:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_cry.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;a href=&#8221;javascript:grin(&#8216;:mrgreen:&#8217;)&#8221;&gt;&lt;img src=&#8221;&lt;?php bloginfo(&#8216;wpurl&#8217;); ?&gt;\/wp-<br \/>\nincludes\/images\/smilies\/icon_mrgreen.gif&#8221; alt=&#8221;&#8221; \/&gt;&lt;\/a&gt;<br \/>\n&lt;br \/&gt;[\/code]<br \/>\n\u5982\u4f55\u8c03\u7528\u4ee5\u4e0a\u4ee3\u7801\u5462\uff1f<br \/>\n2\uff0c\u6253\u5f00\u4e3b\u9898\u6587\u4ef6comments.php\u5728textarea\u4e4b\u524d\u7684\u9002\u5f53\u4f4d\u7f6e\u52a0\u4e0a\uff1a<br \/>\n[code]&lt;?php include(TEMPLATEPATH . &#8216;\/smiley.php&#8217;); ?&gt;[\/code]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u4f7f\u7528wordpress\u7f51\u7ad9\u5efa\u8bbe\u4e5f\u6709\u4e00\u6bb5\u65f6\u95f4\u4e86\uff0c\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u4e5f\u9047\u5230\u5404\u79cd\u529f\u80fd\u4e0a\u7684\u9700\u6c42\u4f46\u662f\u5bf9\u4e8e\u4e00\u4e9b\u4e0d\u61c2\u5199\u7a0b\u5e8f\u4ee3\u7801\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"close","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,11],"tags":[],"class_list":["post-1636","post","type-post","status-publish","format-standard","hentry","category-wordpress","category-11"],"_links":{"self":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/1636","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1636"}],"version-history":[{"count":0,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/1636\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1636"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1636"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}