{"id":3213,"date":"2025-06-11T19:28:14","date_gmt":"2025-06-11T11:28:14","guid":{"rendered":"https:\/\/www.zhaozhao123.cn\/wpcms\/wpdt\/3213.html"},"modified":"2025-06-14T11:47:51","modified_gmt":"2025-06-14T03:47:51","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8wordpress%e5%9d%97%e7%bc%96%e8%be%91%e5%99%a8%e4%b8%ad%e6%b7%bb%e5%8a%a0%e5%8d%8f%e4%bd%9c%e5%8a%9f%e8%83%bd%ef%bc%88%e8%b0%b7%e6%ad%8c%e6%96%87%e6%a1%a3%e9%a3%8e%e6%a0%bc","status":"publish","type":"post","link":"https:\/\/www.zhaozhao123.cn\/wpcms\/post\/3213.html","title":{"rendered":"\u5982\u4f55\u5728WordPress\u5757\u7f16\u8f91\u5668\u4e2d\u6dfb\u52a0\u534f\u4f5c\u529f\u80fd\uff08\u8c37\u6b4c\u6587\u6863\u98ce\u683c\uff09"},"content":{"rendered":"<div class=\"wp-block-columns p-0 border is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-columns px-4 py-3 border-bottom has-background is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\" style=\"background:linear-gradient(243deg,rgb(238,238,238) 0%,rgba(58,166,242,0.15) 100%)\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\r\n<figure class=\"wp-block-image size-thumbnail is-resized is-style-rounded is-style-rounded--1\"><img decoding=\"async\" src=\"https:\/\/www.zhaozhao123.cn\/myitems\/images\/sites16\/2025\/06\/dyA-1-400x300.jpg\" alt=\"Bug&#32534;&#35793;&#29422;\" class=\"wp-image-1842\" style=\"object-fit:cover;width:30px;height:30px\"><\/figure>\r\n\r\n\r\n\r\n<p class=\"my-0\">Bug&#32534;&#35793;&#29422;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"wp-block-columns px-xl-5 px-4 py-xl-4 py-3 is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<p>&#35201;&#23454;&#29616;WordPress&#20013;&#30340;&#21327;&#20316;&#21151;&#33021;&#65292;&#25105;&#20204;&#21487;&#20197;&#21033;&#29992;Google Docs API&#26469;&#21019;&#24314;&#19968;&#20010;&#31616;&#21333;&#30340;&#21327;&#20316;&#24179;&#21488;&#12290;&#36825;&#20010;&#24179;&#21488;&#20801;&#35768;&#29992;&#25143;&#36890;&#36807;&#25554;&#20214;&#25110;&#33258;&#23450;&#20041;&#20195;&#30721;&#19982;&#21516;&#20107;&#19968;&#36215;&#32534;&#36753;&#25991;&#31456;&#12289;&#39029;&#38754;&#31561;&#12290;&#20197;&#19979;&#26159;&#22914;&#20309;&#35774;&#32622;&#36825;&#26679;&#19968;&#20010;&#31995;&#32479;&#30340;&#35814;&#32454;&#27493;&#39588;&#65306;<\/p>\n<h3>&#27493;&#39588; 1: &#23433;&#35013;&#25554;&#20214;<\/h3>\n<p>&#39318;&#20808;&#65292;&#20320;&#38656;&#35201;&#23433;&#35013;&#19968;&#20010;&#21517;&#20026;<code>WP Google Docs<\/code>&#30340;&#25554;&#20214;&#12290;&#36825;&#20010;&#25554;&#20214;&#20801;&#35768;&#20320;&#22312;WordPress&#20013;&#20351;&#29992;Google Docs&#20316;&#20026;&#21327;&#20316;&#24037;&#20855;&#12290;<\/p>\n<h4>&#22914;&#20309;&#23433;&#35013;&#25554;&#20214;&#65306;<\/h4>\n<ol>\n<li>&#30331;&#24405;&#21040;&#24744;&#30340;WordPress&#31649;&#29702;&#21518;&#21488;&#12290;<\/li>\n<li>&#23548;&#33322;&#21040;&ldquo;&#25554;&#20214;&rdquo;&#37096;&#20998;&#12290;<\/li>\n<li>&#25628;&#32034;&#24182;&#28857;&#20987;&ldquo;WP Google Docs&rdquo;&#25554;&#20214;&#12290;<\/li>\n<li>&#28857;&#20987;&ldquo;&#23433;&#35013;&rdquo;&#65292;&#28982;&#21518;&#28857;&#20987;&ldquo;&#28608;&#27963;&rdquo;&#12290;<\/li>\n<\/ol>\n<h3>&#27493;&#39588; 2: &#37197;&#32622;Google Docs API<\/h3>\n<p>&#25509;&#19979;&#26469;&#65292;&#25105;&#20204;&#38656;&#35201;&#37197;&#32622;Google Docs API&#20197;&#30830;&#20445;&#23427;&#33021;&#22815;&#35775;&#38382;&#24744;&#30340;Google&#36134;&#25143;&#21644;&#25991;&#26723;&#12290;<\/p>\n<ol>\n<li>&#25171;&#24320;Chrome&#27983;&#35272;&#22120;&#65292;&#36827;&#20837;Google&#24080;&#25143;&#39029;&#38754;&#12290;<\/li>\n<li>&#36716;&#21040;&ldquo;&#35774;&#32622;&rdquo; &gt; &ldquo;&#24212;&#29992;&rdquo; &gt; &ldquo;&#21551;&#29992;&#24320;&#21457;&#32773;&#27169;&#24335;&rdquo;&#12290;<\/li>\n<li>&#22312;Google Chrome&#22320;&#22336;&#26639;&#36755;&#20837; <code>chrome:\/\/settings\/internet\/<\/code> &#24182;&#25353;Enter&#12290;<\/li>\n<li>&#30830;&#20445;&ldquo;&#21516;&#27493;&#32593;&#31449;&#21382;&#21490;&#35760;&#24405;&rdquo;&#36873;&#39033;&#24050;&#24320;&#21551;&#12290;<\/li>\n<li>&#36820;&#22238;&#21040;Google Docs&#65292;&#28857;&#20987;&#21491;&#19978;&#35282;&#30340;&#40831;&#36718;&#22270;&#26631;&#65292;&#36873;&#25321;&ldquo;&#39640;&#32423;&#35774;&#32622;&rdquo;&#12290;<\/li>\n<li>&#21521;&#19979;&#28378;&#21160;&#25214;&#21040;&ldquo;&#24212;&#29992;&#31243;&#24207;&rdquo;&#26631;&#31614;&#39029;&#65292;&#22312;&#36825;&#37324;&#21246;&#36873;&ldquo;Web&#24212;&#29992;&#31243;&#24207;&#24320;&#21457;&#20154;&#21592;&rdquo;&#36873;&#39033;&#12290;<\/li>\n<\/ol>\n<h3>&#27493;&#39588; 3: &#21019;&#24314;&#21644;&#20849;&#20139;&#25991;&#26723;<\/h3>\n<p>&#29616;&#22312;&#20320;&#21487;&#20197;&#24320;&#22987;&#21019;&#24314;&#21644;&#20998;&#20139;Google Docs&#25991;&#26723;&#20102;&#12290;&#36825;&#20123;&#25991;&#26723;&#23558;&#22312;WordPress&#25554;&#20214;&#20013;&#26174;&#31034;&#20026;&#38142;&#25509;&#65292;&#29992;&#25143;&#21487;&#20197;&#36890;&#36807;&#28857;&#20987;&#38142;&#25509;&#26469;&#25171;&#24320;&#21644;&#32534;&#36753;&#25991;&#26723;&#12290;<\/p>\n<h4>&#31034;&#20363;&#20195;&#30721;&#65306;<\/h4>\n<pre><code class=\"language-php\">\/\/ &#20551;&#35774;&#25105;&#20204;&#26377;&#19968;&#20010;&#24050;&#26377;&#30340;Google Docs&#38142;&#25509;\n$documentUrl = 'https:\/\/docs.google.com\/document\/d\/1ZQyXxv8uKjLrU9hTtDnFJ7mzWqRwEeI\/edit#';\n\n\/\/ &#33719;&#21462;Google Docs&#26381;&#21153;&#23545;&#35937;\n$client = new Google_Client();\n$client-&gt;setApplicationName('My WordPress Plugin');\n$client-&gt;setScopes([Google_Service_Docs::DOCUMENTS_EDIT]);\n$client-&gt;setAuthConfig('path\/to\/client_secret.json'); \/\/ &#26367;&#25442;&#20026;&#20320;&#33258;&#24049;&#30340;&#23458;&#25143;&#31471;&#23494;&#38053;&#25991;&#20214;&#36335;&#24452;\n\n\/\/ &#20351;&#29992;&#25480;&#26435;&#30721;&#33719;&#21462;token\n$authCode = readline(\"Paste the authorization code here:\");\n$accessToken = $client-&gt;authenticate($authCode);\n\n\/\/ &#35774;&#32622;&#26032;&#30340;&#35775;&#38382;&#20196;&#29260;\n$service = new Google_Service_Docs($client);<\/code><\/pre>\n<h3>&#27493;&#39588; 4: &#36830;&#25509;Google Docs&#21040;WordPress<\/h3>\n<p>&#26368;&#21518;&#19968;&#27493;&#26159;&#23558;Google Docs&#25991;&#26723;&#36830;&#25509;&#21040;WordPress&#12290;&#36825;&#36890;&#24120;&#28041;&#21450;&#32534;&#20889;&#19968;&#27573;PHP&#20195;&#30721;&#65292;&#35813;&#20195;&#30721;&#20250;&#20174;Google Docs&#26816;&#32034;&#25991;&#26723;&#25968;&#25454;&#65292;&#24182;&#23558;&#20854;&#25554;&#20837;&#21040;WordPress&#24086;&#23376;&#25110;&#39029;&#38754;&#20013;&#12290;<\/p>\n<h4>&#31034;&#20363;&#20195;&#30721;&#65306;<\/h4>\n<pre><code class=\"language-php\">\/\/ &#26681;&#25454;&#20320;&#30340;&#38656;&#27714;&#20462;&#25913;&#27492;&#20989;&#25968;\nfunction get_google_docs_content() {\n    $documentId = 'your_document_id';\n    $request = new Google_Service_Docs_DocumentRequest();\n\n    try {\n        $response = $service-&gt;documents()-&gt;get($documentId, $request);\n        return $response;\n    } catch (Exception $e) {\n        echo \"Error getting document content: {$e-&gt;getMessage()}\";\n    }\n}\n\n\/\/ &#25554;&#20837;&#25991;&#26723;&#20869;&#23481;&#21040;WordPress\nfunction insert_google_docs_content($postID) {\n    $content = get_google_docs_content();\n    if ($content) {\n        wp_insert_post(array(\n            'post_title' =&gt; 'Your Post Title',\n            'post_content' =&gt; $content['body']['content'],\n            'post_status' =&gt; 'publish'\n        ));\n    }\n}<\/code><\/pre>\n<p>&#36825;&#27573;&#20195;&#30721;&#20551;&#35774;&#20320;&#24050;&#32463;&#26377;&#20102;&#19968;&#20010;&#29305;&#23450;&#30340;Google Docs&#25991;&#26723;ID&#65292;&#24182;&#19988;&#30693;&#36947;&#22914;&#20309;&#20174;Google Docs&#33719;&#21462;&#25991;&#26723;&#20869;&#23481;&#12290;&#26681;&#25454;&#23454;&#38469;&#38656;&#27714;&#65292;&#21487;&#33021;&#38656;&#35201;&#35843;&#25972;&#20195;&#30721;&#20197;&#36866;&#24212;&#19981;&#21516;&#30340;&#22330;&#26223;&#12290;<\/p>\n<p>&#20197;&#19978;&#23601;&#26159;&#35774;&#32622;&#19968;&#20010;&#22522;&#26412;&#30340;Google Docs&#21327;&#20316;&#31995;&#32479;&#25152;&#38656;&#30340;&#25152;&#26377;&#27493;&#39588;&#12290;&#35831;&#27880;&#24847;&#65292;&#20026;&#20102;&#23433;&#20840;&#24615;&#21644;&#38544;&#31169;&#24615;&#32771;&#34385;&#65292;&#24212;&#22987;&#32456;&#36981;&#24490;Google&#30340;&#26381;&#21153;&#26465;&#27454;&#21644;&#25919;&#31574;&#12290;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div><div class=\"wp-block-columns p-0 border is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-columns px-4 py-3 border-bottom has-background is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\" style=\"background:linear-gradient(243deg,rgb(238,238,238) 0%,rgba(58,166,242,0.15) 100%)\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\r\n<figure class=\"wp-block-image size-thumbnail is-resized is-style-rounded is-style-rounded--2\"><img decoding=\"async\" src=\"https:\/\/www.zhaozhao123.cn\/myitems\/images\/sites16\/2025\/06\/zp-400x300.jpg\" alt=\"&#40657;&#26495;&#21069;&#30340;Bug&#35821;&#27861;&#35762;&#24072;\" class=\"wp-image-1849\" style=\"object-fit:cover;width:30px;height:30px\"><\/figure>\r\n\r\n\r\n\r\n<p class=\"my-0\">&#40657;&#26495;&#21069;&#30340;Bug&#35821;&#27861;&#35762;&#24072;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"wp-block-columns px-xl-5 px-4 py-xl-4 py-3 is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<p>&#22312;WordPress&#20013;&#65292;&#25105;&#20204;&#21487;&#20197;&#36890;&#36807;&#20351;&#29992;&#22359;&#32534;&#36753;&#22120;&#26469;&#21019;&#24314;&#21644;&#31649;&#29702;&#21327;&#20316;&#24037;&#20316;&#27969;&#31243;&#12290;&#20197;&#19979;&#26159;&#19968;&#20123;&#27493;&#39588;&#21644;&#31034;&#20363;&#20195;&#30721;&#65292;&#24110;&#21161;&#24744;&#22312;WordPress&#22359;&#32534;&#36753;&#22120;&#20013;&#23454;&#29616;&#19982;Google Docs&#31867;&#20284;&#30340;&#21327;&#20316;&#21151;&#33021;&#65306;<\/p>\n<h3>&#27493;&#39588; 1: &#23433;&#35013;&#24517;&#35201;&#30340;&#25554;&#20214;<\/h3>\n<p>&#39318;&#20808;&#65292;&#38656;&#35201;&#23433;&#35013;&#19968;&#20010;&#21487;&#20197;&#25552;&#20379;&#21327;&#20316;&#21151;&#33021;&#30340;&#25554;&#20214;&#12290;WordPress&#31038;&#21306;&#20013;&#26377;&#35768;&#22810;&#25554;&#20214;&#21487;&#20197;&#28385;&#36275;&#36825;&#19968;&#38656;&#27714;&#65292;&#20294;&#36825;&#37324;&#25512;&#33616;&#20351;&#29992;&ldquo;WP Editor Collaboration&rdquo;&#25554;&#20214;&#12290;<\/p>\n<ul>\n<li><strong>&#19979;&#36733;&#24182;&#23433;&#35013;<\/strong>&#65306;&#35775;&#38382;&#25554;&#20214;&#21830;&#24215;&#65288;<a href=\"https:\/\/www.zhaozhao123.cn\/skin\/go?url=aHR0cHM6Ly93b3JkcHJlc3Mub3JnL3BsdWdpbnMvd3AtZWRpdG9yLWNvbGxhYm9yYXRpb24vJUVGJUJDJTg5JUVGJUJDJThDJUU3JTg0JUI2JUU1JTkwJThFJUU3JTgyJUI5JUU1JTg3JUJCJUUyJTgwJTlDSW5zdGFsbA==\" rel=\"noopener noreferrer nofollow\">https:\/\/wordpress.org\/plugins\/wp-editor-collaboration\/&#65289;&#65292;&#28982;&#21518;&#28857;&#20987;&ldquo;Install<\/a> Now&rdquo;&#12290;<\/li>\n<\/ul>\n<h3>&#27493;&#39588; 2: &#21019;&#24314;&#22359;<\/h3>\n<p>&#20026;&#20102;&#26041;&#20415;&#22320;&#22312;WordPress&#20013;&#38598;&#25104;Google&#25991;&#26723;&#30340;&#21151;&#33021;&#65292;&#24744;&#21487;&#20197;&#21019;&#24314;&#19968;&#20010;&#26032;&#31867;&#22411;&#30340;&#22359;&#12290;&#36825;&#23558;&#20801;&#35768;&#29992;&#25143;&#36890;&#36807;&#25302;&#25918;&#26041;&#24335;&#36731;&#26494;&#21019;&#24314;&#25991;&#26723;&#25110;&#34920;&#26684;&#31561;&#32467;&#26500;&#21270;&#20869;&#23481;&#12290;<\/p>\n<ul>\n<li><strong>&#21019;&#24314;&#22359;<\/strong>&#65306;&#22312;WordPress&#21518;&#21488;&#30340;&ldquo;&#32534;&#36753;&#22120;&rdquo;&#37096;&#20998;&#65292;&#28857;&#20987;&ldquo;&#25554;&#20837;&rdquo;&#22270;&#26631;&#65292;&#36873;&#25321;&ldquo;&#22359;&rdquo;&#65292;&#28982;&#21518;&#22312;&#24038;&#20391;&#30340;&#21015;&#34920;&#20013;&#25214;&#21040;&#24182;&#36873;&#25321;&ldquo;&#33258;&#23450;&#20041;&#21306;&#22359;&rdquo;&#12290;&#28857;&#20987;&ldquo;&#21019;&#24314;&#26032;&#21306;&#22359;&rdquo;&#12290;<\/li>\n<\/ul>\n<h3>&#27493;&#39588; 3: &#28155;&#21152;&#21327;&#20316;&#21151;&#33021;<\/h3>\n<p>&#29616;&#22312;&#65292;&#25105;&#20204;&#38656;&#35201;&#20026;&#36825;&#20010;&#26032;&#30340;&#22359;&#31867;&#22411;&#28155;&#21152;&#19968;&#20123;&#39069;&#22806;&#30340;&#29305;&#24615;&#65292;&#20351;&#20854;&#33021;&#22815;&#25903;&#25345;&#21327;&#20316;&#12290;&#36825;&#21253;&#25324;&#65306;<\/p>\n<ul>\n<li><strong>&#26631;&#39064;&#26639;<\/strong>&#65306;&#26174;&#31034;&#19968;&#20010;&#26631;&#39064;&#26465;&#65292;&#19978;&#38754;&#26377;&#19968;&#20010;&#25991;&#26412;&#36755;&#20837;&#26694;&#65292;&#29992;&#20110;&#35760;&#24405;&#21327;&#20316;&#30340;&#24320;&#22987;&#26102;&#38388;&#12290;<\/li>\n<li><strong>&#26085;&#26399;&#26102;&#38388;&#23383;&#27573;<\/strong>&#65306;&#35753;&#21442;&#19982;&#32773;&#30693;&#36947;&#20309;&#26102;&#24320;&#22987;&#25110;&#32467;&#26463;&#21327;&#20316;&#12290;<\/li>\n<li><strong>&#25552;&#20132;&#25353;&#38062;<\/strong>&#65306;&#24403;&#26576;&#20010;&#21442;&#19982;&#32773;&#23436;&#25104;&#25552;&#20132;&#26102;&#65292;&#24212;&#35813;&#33258;&#21160;&#35302;&#21457;&#25552;&#20132;&#20107;&#20214;&#12290;<\/li>\n<\/ul>\n<h4>&#31034;&#20363;&#20195;&#30721;&#65306;<\/h4>\n<pre><code class=\"language-html\">&lt;div class=\"editor-block\"&gt;\n    &lt;div class=\"block-title\"&gt;&#24320;&#22987;&#21327;&#20316;&lt;\/div&gt;\n    &lt;input type=\"text\" id=\"collaborate-start-time-input\" \/&gt;\n    &lt;button id=\"start-collaboration-button\"&gt;&#24320;&#22987;&#21327;&#20316;&lt;\/button&gt;\n\n    &lt;div class=\"block-content\"&gt;\n        &lt;textarea id=\"collaborate-textarea\"&gt;&lt;\/textarea&gt;\n    &lt;\/div&gt;\n&lt;\/div&gt;<\/code><\/pre>\n<h3>&#27493;&#39588; 4: &#23454;&#29616;&#21327;&#20316;&#21151;&#33021;<\/h3>\n<p>&#25509;&#19979;&#26469;&#65292;&#38656;&#35201;&#23454;&#29616;&#21327;&#20316;&#21151;&#33021;&#12290;&#36825;&#24847;&#21619;&#30528;&#27599;&#24403;&#26377;&#26032;&#30340;&#21442;&#19982;&#32773;&#21152;&#20837;&#25110;&#31163;&#24320;&#65292;&#37117;&#38656;&#35201;&#26356;&#26032;&#21327;&#20316;&#29366;&#24577;&#65292;&#20197;&#21450;&#20445;&#23384;&#20219;&#20309;&#24050;&#25552;&#20132;&#30340;&#20869;&#23481;&#12290;<\/p>\n<ul>\n<li><strong>&#23454;&#26102;&#21327;&#20316;<\/strong>&#65306;&#20351;&#29992;<code>wp_editor()<\/code>&#20989;&#25968;&#26469;&#33719;&#21462;&#24403;&#21069;&#30340;&#29366;&#24577;&#20449;&#24687;&#65292;&#20363;&#22914;&#26159;&#21542;&#26377;&#20154;&#27491;&#22312;&#21442;&#19982;&#12289;&#21738;&#20123;&#20154;&#24050;&#32463;&#25552;&#20132;&#20102;&#20869;&#23481;&#31561;&#31561;&#12290;<\/li>\n<\/ul>\n<pre><code class=\"language-php\">function get_collaboration_status() {\n    global $wpdb;\n\n    \/\/ &#20551;&#35774;&#25968;&#25454;&#24211;&#34920;&#21517;&#20026; \"collaborations\"\n    $sql = \"SELECT * FROM $wpdb-&gt;prefix.collaborations\";\n    $result = $wpdb-&gt;get_results($sql);\n\n    return array_map(function ($row) use (&amp;$sql, &amp;$result) {\n        return [\n            'is_started' =&gt; isset($row['status']) &amp;&amp; $row['status'] == 'started',\n            'participants' =&gt; count($result),\n            'submitted_content' =&gt; isset($row['content']) ? $row['content'] : null,\n        ];\n    }, $result);\n}<\/code><\/pre>\n<ul>\n<li><strong>&#20445;&#23384;&#25552;&#20132;<\/strong>&#65306;&#27599;&#24403;&#26377;&#20154;&#25552;&#20132;&#20869;&#23481;&#26102;&#65292;&#37117;&#35201;&#26356;&#26032;&#25968;&#25454;&#24211;&#20013;&#30340;&#30456;&#24212;&#34892;&#65292;&#20197;&#20415;&#20854;&#20182;&#21442;&#19982;&#32773;&#21487;&#20197;&#30475;&#21040;&#20182;&#20204;&#30340;&#36129;&#29486;&#12290;<\/li>\n<\/ul>\n<pre><code class=\"language-php\">add_action('save_post', function ($post_id) {\n    if (isset($_POST['submit'])) {\n        \/\/ &#33719;&#21462;&#24403;&#21069;&#21442;&#19982;&#32773;&#30340;ID\n        $participant_id = $_POST['participant_id'];\n\n        \/\/ &#26356;&#26032;&#25968;&#25454;&#24211;&#20013;&#30340;&#34892;\n        update_post_meta($post_id, 'submitted_content', wpautop(get_the_content()));\n        update_post_meta($post_id, 'submitter_id', $participant_id);\n    }\n});<\/code><\/pre>\n<h3>&#32467;&#35770;<\/h3>\n<p>&#36890;&#36807;&#20197;&#19978;&#27493;&#39588;&#65292;&#24744;&#21487;&#20197;&#21019;&#24314;&#19968;&#20010;&#31616;&#21333;&#30340;&#21327;&#20316;&#31995;&#32479;&#65292;&#20351;&#29992;&#25143;&#21487;&#20197;&#22312;WordPress&#19978;&#36731;&#26494;&#22320;&#21019;&#24314;&#12289;&#31649;&#29702;&#21644;&#20998;&#20139;&#25991;&#26723;&#12290;&#35831;&#27880;&#24847;&#65292;&#23454;&#38469;&#24212;&#29992;&#20013;&#21487;&#33021;&#38656;&#35201;&#26681;&#25454;&#20855;&#20307;&#30340;&#38656;&#27714;&#36827;&#19968;&#27493;&#25193;&#23637;&#21644;&#23436;&#21892;&#27492;&#31995;&#32479;&#12290;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Bug&#32534;&#35793;&#29422; &#35201;&#23454;&#29616;WordPress&#20013;&#30340;&#21327;&#20316;&#21151;&#33021;&#65292;&#25105;&#20204;&#21487;&#20197;&#21033;&#038;#2..<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[2107,2106,3193],"tuisongtax":[],"class_list":["post-3213","post","type-post","status-publish","format-standard","hentry","category-wpdt","tag-cjyy","tag-cjzn","tag-bjqsyjq"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/3213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/comments?post=3213"}],"version-history":[{"count":0,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/posts\/3213\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/media?parent=3213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/categories?post=3213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tags?post=3213"},{"taxonomy":"tuisongtax","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tuisongtax?post=3213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}