{"id":4898,"date":"2025-11-20T19:46:19","date_gmt":"2025-11-20T11:46:19","guid":{"rendered":"https:\/\/www.zhaozhao123.cn\/wpcms\/bjjc\/4898.html"},"modified":"2025-11-20T19:46:20","modified_gmt":"2025-11-20T11:46:20","slug":"%e4%b8%bawordpress%e5%8c%ba%e5%9d%97%e6%b7%bb%e5%8a%a0%e8%87%aa%e5%ae%9a%e4%b9%89%e6%a0%b7%e5%bc%8f%ef%bc%9a%e4%b8%ba%e5%88%97%e8%a1%a8%e5%9d%97%e6%b7%bb%e5%8a%a0%e5%af%b9%e5%8f%b7%ef%bc%88%e2%88%9a","status":"publish","type":"bjjc","link":"https:\/\/www.zhaozhao123.cn\/wpcms\/bjjc\/4898.html","title":{"rendered":"\u4e3aWordPress\u533a\u5757\u6dfb\u52a0\u81ea\u5b9a\u4e49\u6837\u5f0f\uff1a\u4e3a\u5217\u8868\u5757\u6dfb\u52a0\u5bf9\u53f7\uff08\u221a\uff09\u6837\u5f0f"},"content":{"rendered":"<h2 class=\"wp-block-heading\">\u672c\u6587\u6838\u5fc3\u4ee3\u7801<\/h2><pre class=\"wp-block-code\"><code>\/\/ \u4e3aWordPress\u533a\u5757\u6dfb\u52a0\u81ea\u5b9a\u4e49\u6837\u5f0f\uff1a\u4e3a\u5217\u8868\u5757\u6dfb\u52a0\u5bf9\u53f7\uff08\u221a\uff09\u6837\u5f0f\nif ( ! function_exists( 'yixiuk2_block_styles' ) ) :\n\tfunction yixiuk2_block_styles() {\n\t\tregister_block_style(\n\t\t\t'core\/list',\n\t\t\tarray(\n\t\t\t\t'name'         =&gt; 'checkmark-list',\n\t\t\t\t'label'        =&gt; __( 'Checkmark', 'yixiuk2' ),\n\t\t\t\t'inline_style' =&gt; '\n\t\t\t\tul.is-style-checkmark-list {\n\t\t\t\t\tlist-style-type: \"2713\";\n\t\t\t\t}\n\n\t\t\t\tul.is-style-checkmark-list li {\n\t\t\t\t\tpadding-inline-start: 1ch;\n\t\t\t\t}',\n\t\t\t)\n\t\t);\n\t}\nendif;\nadd_action( 'init', 'yixiuk2_block_styles' );<\/code><\/pre><h2 class=\"wp-block-heading\">\u4ee3\u7801\u4f4d\u7f6e<\/h2><p>\u63a8\u8350\u5c06\u6b64\u4ee3\u7801\u5b9e\u73b0\u653e\u7f6e\u5230\u4e3b\u9898\u7684 funtion.php \u4e2d\u3002<\/p><hr class=\"wp-block-separator has-alpha-channel-opacity\"><p>\u4ee5\u4e0b\u662f\u5bf9\u4ee5\u4e0a\u4ee3\u7801\u7684\u62c6\u89e3\uff1a<\/p><h2 class=\"wp-block-heading\">\u4ee3\u7801\u7ed3\u6784\u5206\u6790<\/h2><h3 class=\"wp-block-heading\">1. \u51fd\u6570\u5b58\u5728\u6027\u68c0\u67e5<\/h3><pre class=\"wp-block-code\"><code>if ( ! function_exists( 'yixiuk2_block_styles' ) ) :<\/code><\/pre><ul class=\"wp-block-list\">\n<li>\u68c0\u67e5\u662f\u5426\u5df2\u7ecf\u5b58\u5728\u540c\u540d\u51fd\u6570\uff0c\u907f\u514d\u91cd\u590d\u5b9a\u4e49\u51b2\u7a81<\/li>\n\n\n\n<li><code>:<\/code> \u662f PHP \u66ff\u4ee3\u8bed\u6cd5\uff0c\u4e0e <code>endif<\/code> \u914d\u5bf9\u4f7f\u7528<\/li>\n<\/ul><h3 class=\"wp-block-heading\">2. \u4e3b\u51fd\u6570\u5b9a\u4e49<\/h3><pre class=\"wp-block-code\"><code>function yixiuk2_block_styles() {\n    register_block_style(\n        'core\/list',  \/\/ \u76ee\u6807\u533a\u5757\uff1a\u6838\u5fc3\u5217\u8868\u533a\u5757\n        array(\n            'name'         =&gt; 'checkmark-list',  \/\/ \u6837\u5f0f\u6807\u8bc6\u7b26\n            'label'        =&gt; __( 'Checkmark', 'yixiuk2' ),  \/\/ \u663e\u793a\u540d\u79f0\uff08\u53ef\u7ffb\u8bd1\uff09\n            'inline_style' =&gt; '\n            ul.is-style-checkmark-list {\n                list-style-type: \"2713\";  \/\/ Unicode \u5bf9\u52fe\u7b26\u53f7\n            }\n            ul.is-style-checkmark-list li {\n                padding-inline-start: 1ch;  \/\/ \u5de6\u5185\u8fb9\u8ddd 1 \u5b57\u7b26\u5bbd\u5ea6\n            }',\n        )\n    );\n}\nendif;<\/code><\/pre><h3 class=\"wp-block-heading\">3. \u94a9\u5b50\u6ce8\u518c<\/h3><pre class=\"wp-block-code\"><code>add_action( 'init', 'yixiuk2_block_styles' );<\/code><\/pre><ul class=\"wp-block-list\">\n<li>\u5728 WordPress \u521d\u59cb\u5316\u65f6\u6267\u884c\u51fd\u6570<\/li>\n\n\n\n<li><code>init<\/code> \u662f\u6ce8\u518c\u533a\u5757\u6837\u5f0f\u7684\u9002\u5f53\u65f6\u673a<\/li>\n<\/ul><h2 class=\"wp-block-heading\">\u529f\u80fd\u8be6\u89e3<\/h2><h3 class=\"wp-block-heading\">CSS \u6837\u5f0f\u8bf4\u660e<\/h3><ul class=\"wp-block-list\">\n<li><strong><code>list-style-type: \"2713\"<\/code><\/strong>: \u5c06\u5217\u8868\u6807\u8bb0\u6539\u4e3a Unicode \u5bf9\u52fe\u7b26\u53f7 (\u2713)<\/li>\n\n\n\n<li><strong><code>padding-inline-start: 1ch<\/code><\/strong>:<\/li>\n\n\n\n<li><code>ch<\/code> \u5355\u4f4d\u57fa\u4e8e\u6570\u5b57 &#8220;0&#8221; \u7684\u5bbd\u5ea6<\/li>\n\n\n\n<li>\u4e3a\u5217\u8868\u9879\u6dfb\u52a0 1 \u5b57\u7b26\u5bbd\u5ea6\u7684\u5de6\u5185\u8fb9\u8ddd<\/li>\n\n\n\n<li><code>inline-start<\/code> \u652f\u6301 RTL\uff08\u4ece\u53f3\u5230\u5de6\uff09\u8bed\u8a00<\/li>\n<\/ul><h3 class=\"wp-block-heading\">\u5b9e\u9645\u6548\u679c<\/h3><p>\u5e94\u7528\u6b64\u6837\u5f0f\u540e\uff1a<\/p><ul class=\"wp-block-list\">\n<li>\u65e0\u5e8f\u5217\u8868\u4f1a\u663e\u793a\u4e3a\u5bf9\u52fe\u6807\u8bb0 \u2713 \u800c\u4e0d\u662f\u9ed8\u8ba4\u7684\u5706\u70b9<\/li>\n\n\n\n<li>\u5728\u533a\u5757\u7f16\u8f91\u5668\u7684\u6837\u5f0f\u9762\u677f\u4e2d\u4f1a\u51fa\u73b0 &#8220;Checkmark&#8221; \u9009\u9879<\/li>\n<\/ul><h2 class=\"wp-block-heading\">\u4f7f\u7528\u573a\u666f<\/h2><p>\u5728\u53e4\u817e\u5821\u7f16\u8f91\u5668\u4e2d\uff1a<\/p><ol class=\"wp-block-list\">\n<li>\u6dfb\u52a0\u4e00\u4e2a\u5217\u8868\u533a\u5757<\/li>\n\n\n\n<li>\u5728\u53f3\u4fa7\u8fb9\u680f\u7684 &#8220;\u6837\u5f0f&#8221; \u8bbe\u7f6e\u4e2d<\/li>\n\n\n\n<li>\u9009\u62e9 &#8220;Checkmark&#8221; \u6837\u5f0f\u9009\u9879<\/li>\n<\/ol><h2 class=\"wp-block-heading\">\u6269\u5c55\u793a\u4f8b<\/h2><p>\u53ef\u4ee5\u6ce8\u518c\u591a\u4e2a\u533a\u5757\u6837\u5f0f\uff1a<\/p><pre class=\"wp-block-code\"><code>function yixiuk2_block_styles() {\n    \/\/ \u5bf9\u52fe\u5217\u8868\u6837\u5f0f\n    register_block_style('core\/list', array(\n        'name'  =&gt; 'checkmark-list',\n        'label' =&gt; __('Checkmark', 'yixiuk2'),\n        'inline_style' =&gt; 'ul.is-style-checkmark-list { list-style-type: \"2713\"; }'\n    ));\n\n    \/\/ \u53c9\u53f7\u5217\u8868\u6837\u5f0f\n    register_block_style('core\/list', array(\n        'name'  =&gt; 'cross-list',\n        'label' =&gt; __('Cross', 'yixiuk2'),\n        'inline_style' =&gt; 'ul.is-style-cross-list { list-style-type: \"2717\"; }'\n    ));\n}<\/code><\/pre><p>\u8fd9\u6bb5\u4ee3\u7801\u662f WordPress \u4e3b\u9898\u6216\u63d2\u4ef6\u5f00\u53d1\u4e2d\u5e38\u89c1\u7684\u6a21\u5f0f\uff0c\u7528\u4e8e\u6269\u5c55\u53e4\u817e\u5821\u7f16\u8f91\u5668\u7684\u6837\u5f0f\u9009\u9879\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u6838\u5fc3\u4ee3\u7801 \u4ee3\u7801\u4f4d\u7f6e \u63a8\u8350\u5c06\u6b64\u4ee3\u7801\u5b9e\u73b0\u653e\u7f6e\u5230\u4e3b\u9898\u7684 funtion.php \u4e2d\u3002 \u4ee5\u4e0b\u662f\u5bf9\u4ee5\u4e0a\u4ee3\u7801\u7684\u62c6\u89e3\uff1a \u4ee3\u7801\u7ed3\u6784\u5206\u6790 1. \u51fd\u6570\u5b58\u5728\u6027\u68c0\u67e5 2. \u4e3b\u51fd\u6570\u5b9a\u4e49 3. \u94a9\u5b50\u6ce8\u518c \u529f\u80fd\u8be6\u89e3 CSS \u6837\u5f0f\u8bf4\u660e \u5b9e\u9645\u6548\u679c \u5e94\u7528\u6b64\u6837\u5f0f\u540e\uff1a \u4f7f\u7528\u573a\u666f \u5728\u53e4\u817e\u5821\u7f16\u8f91\u5668\u4e2d\uff1a \u6269\u5c55\u793a\u4f8b \u53ef\u4ee5\u6ce8\u518c\u591a\u4e2a\u533a\u5757\u6837\u5f0f\uff1a \u8fd9\u6bb5\u4ee3\u7801\u662f WordP..<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"template":"","meta":{"_acf_changed":true},"tags":[3294],"bjjc2nav":[3270],"tuisongtax":[],"class_list":["post-4898","bjjc","type-bjjc","status-publish","hentry","tag-wqktjzdyys","bjjc2nav-kys"],"acf":{"qian_art_seotitle":"\u4e3aWordPress\u533a\u5757\u6dfb\u52a0\u81ea\u5b9a\u4e49\u6837\u5f0f\uff1a\u4e3a\u5217\u8868\u5757\u6dfb\u52a0\u5bf9\u53f7\uff08\u221a\uff09\u6837\u5f0f","qian_art_seotitle_source":{"label":"SEO\u6807\u9898","type":"text","formatted_value":"\u4e3aWordPress\u533a\u5757\u6dfb\u52a0\u81ea\u5b9a\u4e49\u6837\u5f0f\uff1a\u4e3a\u5217\u8868\u5757\u6dfb\u52a0\u5bf9\u53f7\uff08\u221a\uff09\u6837\u5f0f"},"qian_art_seokws":"\u4e3aWordPress\u533a\u5757\u6dfb\u52a0\u81ea\u5b9a\u4e49\u6837\u5f0f\u7684\u65b9\u6cd5","qian_art_seokws_source":{"label":"SEO\u5173\u952e\u8bcd","type":"text","formatted_value":"\u4e3aWordPress\u533a\u5757\u6dfb\u52a0\u81ea\u5b9a\u4e49\u6837\u5f0f\u7684\u65b9\u6cd5"},"qian_art_stzhong":"\u6dfb\u52a0\u5757\u6837\u5f0f  \u4e3a\u5217\u8868\u5757\u6dfb\u52a0\u5bf9\u53f7\uff08\u221a\uff09\u6837\u5f0f","qian_art_stzhong_source":{"label":"\u4e2d | \u77ed\u6807\u9898","type":"text","formatted_value":"\u6dfb\u52a0\u5757\u6837\u5f0f  \u4e3a\u5217\u8868\u5757\u6dfb\u52a0\u5bf9\u53f7\uff08\u221a\uff09\u6837\u5f0f"}},"_links":{"self":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/bjjc\/4898","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/bjjc"}],"about":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/types\/bjjc"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/users\/1"}],"wp:attachment":[{"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/media?parent=4898"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tags?post=4898"},{"taxonomy":"bjjc2nav","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/bjjc2nav?post=4898"},{"taxonomy":"tuisongtax","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/wpcms\/wp-json\/wp\/v2\/tuisongtax?post=4898"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}