{"id":2004,"date":"2019-06-11T15:12:10","date_gmt":"2019-06-11T07:12:10","guid":{"rendered":"https:\/\/blog.naibabiji.com\/?p=2004"},"modified":"2021-06-16T00:46:49","modified_gmt":"2021-06-15T16:46:49","slug":"wordpress-ping-lun-kuang-jia-bei-jing","status":"publish","type":"post","link":"https:\/\/blog.naibabiji.com\/skill\/wordpress-ping-lun-kuang-jia-bei-jing.html","title":{"rendered":"\u7ed9WordPress\u8bc4\u8bba\u6846\u6dfb\u52a0\u80cc\u666f\u6587\u5b57\u6559\u7a0b"},"content":{"rendered":"<p>\u56e0\u4e3a\u6700\u8fd1\u6362\u4e0a\u4e86<a href=\"https:\/\/blog.naibabiji.com\/files\/wordpress-you-hua-cha-jian-hummingbird.html\">Hummingbird\u63d2\u4ef6\u6765\u7f13\u5b58<\/a>WordPress\u6587\u7ae0\uff0c\u800cHummingbird\u7684\u7f13\u5b58\u66f4\u65b0\u673a\u5236\u6709\u70b9\u4e0d\u79d1\u5b66\uff0c\u7f13\u5b58\u66f4\u65b0\u7684\u8bdd\u9700\u8981\u5168\u90e8\u6e05\u7a7a\u4e86\u91cd\u65b0\u751f\u6210\u3002\u800c\u5f53\u6709\u4eba\u8bc4\u8bba\u540e\uff0c\u9875\u9762\u4e0d\u9009\u62e9\u66f4\u65b0\u7f13\u5b58\u7684\u8bdd\uff0c\u5c31\u4e0d\u4f1a\u663e\u793a\u51fa\u6765\uff0c\u6240\u4ee5\u5c31\u7814\u7a76\u4e0a\u4e86WordPress\u8bc4\u8bba\u6846\u6dfb\u52a0\u63d0\u793a\u6587\u5b57\u3002<\/p>\n<p><strong>\u6548\u679c\u5982\u4e0b\uff1a<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2005\" src=\"https:\/\/edgeone.naibabiji.com\/wp-content\/uploads\/2019\/06\/1560172410-2019-06-10_21-13-07-compressor.png\" alt=\"WordPress\u8bc4\u8bba\u6846\u80cc\u666f\u6587\u5b57\" width=\"533\" height=\"270\" \/><\/p>\n<p><strong>\u5b9e\u73b0\u65b9\u6cd5\uff1a<\/strong><\/p>\n<p>\u7f51\u4e0a\u641c\u7d22\u5230\u7684\u7ed9WordPress\u6dfb\u52a0\u8bc4\u8bba\u80cc\u666f\u63d0\u793a\u6587\u5b57\u7684\u65b9\u6cd5\u6709\u4e24\u79cd\u65b9\u6cd5\uff0c\u5927\u591a\u6570\u7684\u6587\u7ae0\u90fd\u662f\u4f7f\u7528\u7684\u65b9\u6cd5\u4e00\u5b9e\u73b0\uff0c\u4e0d\u8fc7\u6700\u8fd1\u51e0\u5e74\uff0c\u5c24\u5176\u5230\u4e86\u4e86\uff0c\u57fa\u672c\u4e0a\u4e3b\u9898\u6587\u4ef6\u90fd\u4e0d\u662f\u4ee5\u524d\u90a3\u4e48\u5199\u7684\u4e86\uff0c\u6240\u4ee5\u5927\u591a\u6570\u90fd\u662f\u901a\u8fc7\u65b9\u6cd5\u4e8c\u5b9e\u73b0\u3002\u770b\u4f60\u4e3b\u9898\u662f\u54ea\u79cd\u65b9\u5f0f\u5b9e\u73b0\u7684\u3002<\/p>\n<h2>\u65b9\u6cd5\u4e00<\/h2>\n<p>\u5982\u679c\u4f60\u7684\u4e3b\u9898comments.php \u6587\u4ef6\u91cc\u9762\u53ef\u4ee5\u76f4\u63a5\u627e\u5230\u4e0b\u9762\u8fd9\u4e32\u4ee3\u7801\u7c7b\u4f3c\u7684<\/p>\n<pre>&lt;textarea name=\"comment\" id=\"comment\" cols=\"60\" rows=\"10\" tabindex=\"4\"&gt;&lt;\/textarea&gt;<\/pre>\n<p>\u90a3\u4e48\u76f4\u63a5\u5728\u8fd9\u4e32\u4ee3\u7801\u91cc\u9762\u6dfb\u52a0\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<pre>&lt;textarea style=\"color:gray\" onblur=\"if (this.value == \u201d) {this.value = \u2018\u6211\u575a\u4fe1\uff0c\u8bc4\u8bba\u53ef\u4ee5\u4e00\u9488\u89c1\u8840\uff01\u2019;} \" onfocus=\"if (this.value == \u2018\u6211\u575a\u4fe1\uff0c\u8bc4\u8bba\u53ef\u4ee5\u4e00\u9488\u89c1\u8840\uff01\u2019) {this.value = \u201d;}\" name=\"comment\" id=\"comment\" cols=\"60\" rows=\"10\" tabindex=\"4\"&gt;\u6211\u575a\u4fe1\uff0c\u8bc4\u8bba\u53ef\u4ee5\u4e00\u9488\u89c1\u8840\uff01&lt;\/textarea&gt;<\/pre>\n<h2>\u65b9\u6cd5\u4e8c<\/h2>\n<p>\u5982\u679c\u4f60\u7684\u4e3b\u9898\u8bc4\u8bba\u6587\u4ef6\u91cc\u9762\u770b\u4e0d\u5230\u4e0a\u9762\u8fd9\u4e32&lt;textarea name=&#8221;comment&#8221;\u7684\u4ee3\u7801\uff0c\u90a3\u4e48\u5c31\u627e\u4e0b\u9762\u8fd9\u4e32\u4ee3\u7801<\/p>\n<pre>&lt;?php comment_form(); ?&gt;<\/pre>\n<p>\u7136\u540e\u628a\u4e0a\u9762\u7684\u4ee3\u7801\u66ff\u6362\u6210\u4e0b\u9762\u8fd9\u4e32\u4ee3\u7801\u5c31\u53ef\u4ee5\u5b9e\u73b0\u6548\u679c\u4e86\u3002<\/p>\n<pre>\t&lt;?php comment_form(\r\n    array(\r\n         'comment_field' =&gt; '&lt;textarea id=\"comment\" name=\"comment\" cols=\"45\" rows=\"8\" maxlength=\"65525\" required=\"required\" placeholder=\"\u8bc4\u8bba\u9700\u5ba1\u6838\uff0c\u8bc4\u8bba\u6709\u7f13\u5b58\u2026\"&gt;&lt;\/textarea&gt;',\r\n            )       \r\n); ?&gt;<\/pre>\n<p>cols=&#8221;45&#8243; rows=&#8221;8&#8243; maxlength=&#8221;65525&#8243;\u8fd9\u4e32\u4ee3\u7801\uff0c\u4f60\u53ef\u4ee5\u67e5\u770b\u4f60\u4e3b\u9898\u9ed8\u8ba4\u524d\u53f0\u663e\u793a\u7684\u662f\u54ea\u79cd\uff0c\u7136\u540e\u66ff\u6362\u6210\u4e3b\u9898\u7684\u4ee3\u7801\u3002<\/p>\n<p>\u9ed8\u8ba4\u8bc4\u8bba\u533a\u57df\u4ee3\u7801<\/p>\n<pre>$fields =  array(\r\n\r\n  'author' =&gt;\r\n    '&lt;p class=\"comment-form-author\"&gt;&lt;label for=\"author\"&gt;' . __( 'Name', 'domainreference' ) .\r\n    ( $req\u00a0? '&lt;span class=\"required\"&gt;*&lt;\/span&gt;'\u00a0: '' ) . '&lt;\/label&gt;' .\r\n    '&lt;input id=\"author\" name=\"author\" type=\"text\" value=\"' . esc_attr( $commenter['comment_author'] ) .\r\n    '\" size=\"30\"' . $aria_req . ' \/&gt;&lt;\/p&gt;',\r\n\r\n  'email' =&gt;\r\n    '&lt;p class=\"comment-form-email\"&gt;&lt;label for=\"email\"&gt;' . __( 'Email', 'domainreference' ) .\r\n    ( $req\u00a0? '&lt;span class=\"required\"&gt;*&lt;\/span&gt;'\u00a0: '' ) . '&lt;\/label&gt;' .\r\n    '&lt;input id=\"email\" name=\"email\" type=\"text\" value=\"' . esc_attr(  $commenter['comment_author_email'] ) .\r\n    '\" size=\"30\"' . $aria_req . ' \/&gt;&lt;\/p&gt;',\r\n\r\n  'url' =&gt;\r\n    '&lt;p class=\"comment-form-url\"&gt;&lt;label for=\"url\"&gt;' . __( 'Website', 'domainreference' ) . '&lt;\/label&gt;' .\r\n    '&lt;input id=\"url\" name=\"url\" type=\"text\" value=\"' . esc_attr( $commenter['comment_author_url'] ) .\r\n    '\" size=\"30\" \/&gt;&lt;\/p&gt;',\r\n);\r\n<\/pre>\n<p>\u4ece4.9.6\u5f00\u59cb\uff0c\u5982\u679c\u201c\u663e\u793a\u8bc4\u8bbacookie\u9009\u62e9\u52a0\u5165\u590d\u9009\u6846\u201d\u3002\u5728\u201c\u8ba8\u8bba\u8bbe\u7f6e\u201d\u4e2d\u9009\u4e2d\uff0ccookie\u540c\u610f\u590d\u9009\u6846\u5c06\u6dfb\u52a0\u5230\u533a\u57df\u4e2d\u3002<\/p>\n<pre>$fields['cookies'] =  '&lt;p class=\"comment-form-cookies-consent\"&gt;&lt;input id=\"wp-comment-cookies-consent\" name=\"wp-comment-cookies-consent\" type=\"checkbox\" value=\"yes\"' . $consent . ' \/&gt;' . '&lt;label for=\"wp-comment-cookies-consent\"&gt;' . __( 'Save my name, email, and website in this browser for the next time I comment.' ) . '&lt;\/label&gt;&lt;\/p&gt;';\r\n<\/pre>\n<p>\u6ce8\u610f\uff1a\u8981\u5728\u81ea\u5b9a\u4e49\u56de\u8c03\u51fd\u6570\u4e2d\u4f7f\u7528\u4e0a\u8ff0\u4ee3\u7801\u4e2d\u7684\u53d8\u91cf\uff0c\u5fc5\u987b\u9996\u5148\u4f7f\u7528\u4ee5\u4e0b\u5185\u5bb9\u5728\u56de\u8c03\u4e2d\u8bbe\u7f6e\u8fd9\u4e9b\u53d8\u91cf\uff1a<\/p>\n<pre>$commenter = wp_get_current_commenter();\r\n$req = get_option( 'require_name_email' );\r\n$aria_req = ( $req\u00a0? \" aria-required='true'\"\u00a0: '' );\r\n\r\n$consent = empty( $commenter['comment_author_email'] )\u00a0? ''\u00a0: ' checked=\"checked\"';<\/pre>\n<p>\u672c\u6587\u53c2\u7167\u4e86\u4ee5\u4e0b\u6587\u7ae0\uff1a<\/p>\n<p><a href=\"https:\/\/www.lushaojun.com\/1433.html\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress\u8bc4\u8bba\u6846\u6dfb\u52a0\u6307\u5f15\u8bf4\u660e<\/a><\/p>\n<p><a href=\"http:\/\/www.inlojv.com\/3636.html\" target=\"_blank\" rel=\"noopener noreferrer\">\u81ea\u5b9a\u4e49\u8bc4\u8bba\u8868\u5355comment_form()<\/a><\/p>\n<p><a href=\"https:\/\/codex.wordpress.org\/Function_Reference\/comment_form\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress\u5b98\u65b9\u6587\u6863Function Reference\/comment form<\/a><\/p>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-center kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;center&quot;,&quot;id&quot;:&quot;2004&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;4&quot;,&quot;greet&quot;:&quot;\u7ed9\u672c\u6587\u6253\u5206 post&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;\u7ed9WordPress\u8bc4\u8bba\u6846\u6dfb\u52a0\u80cc\u666f\u6587\u5b57\u6559\u7a0b&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            <span class=\"kksr-muted\">\u7ed9\u672c\u6587\u6253\u5206 post<\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u56e0\u4e3a\u6700\u8fd1\u6362\u4e0a\u4e86Hummingbird\u63d2\u4ef6\u6765\u7f13\u5b58WordPress\u6587\u7ae0\uff0c\u800cHummingbird\u7684\u7f13\u5b58\u66f4\u65b0\u673a\u5236\u6709 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2093,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"\u7ed9WordPress\u8bc4\u8bba\u6846\u6dfb\u52a0\u80cc\u666f\u6587\u5b57\u6559\u7a0b - \u5976\u7238\u5efa\u7ad9\u7b14\u8bb0","description":"\u56e0\u4e3a\u6700\u8fd1\u6362\u4e0a\u4e86 Hummingbird\u63d2\u4ef6\u6765\u7f13\u5b58 WordPress\u6587\u7ae0\uff0c\u800cHummingbird\u7684\u7f13\u5b58\u66f4\u65b0\u673a\u5236\u6709\u70b9\u4e0d\u79d1\u5b66\uff0c\u7f13\u5b58\u66f4\u65b0\u7684\u8bdd\u9700\u8981\u5168\u90e8\u6e05\u7a7a\u4e86\u91cd\u65b0\u751f\u6210\u3002\u800c\u5f53\u6709\u4eba\u8bc4\u8bba\u540e\uff0c\u9875\u9762\u4e0d\u9009\u62e9\u66f4\u65b0\u7f13\u5b58\u7684\u8bdd\uff0c\u5c31\u4e0d\u4f1a\u663e\u793a\u51fa\u6765\uff0c\u6240\u4ee5\u5c31\u7814\u7a76\u4e0a\u4e86WordPress\u8bc4\u8bba\u6846\u6dfb\u52a0\u63d0\u793a\u6587\u5b57\u3002 \u6548\u679c\u5982\u4e0b\uff1a &nbsp; \u5b9e\u73b0\u65b9\u6cd5\uff1a \u7f51\u4e0a\u641c\u7d22\u5230\u7684"},"footnotes":""},"categories":[142],"tags":[],"class_list":["post-2004","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-skill"],"_links":{"self":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts\/2004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/comments?post=2004"}],"version-history":[{"count":0,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts\/2004\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/media\/2093"}],"wp:attachment":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/media?parent=2004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/categories?post=2004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/tags?post=2004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}