{"id":12361387,"date":"2026-03-11T09:17:56","date_gmt":"2026-03-11T01:17:56","guid":{"rendered":"https:\/\/www.likacloud.com\/knowledge\/%e4%b8%80%e4%b8%aa%e5%ae%8c%e6%95%b4%e7%9a%84-wordpress-%e6%8f%92%e4%bb%b6%e5%bc%80%e5%8f%91%e5%ae%9e%e6%88%98%e6%8c%87%e5%8d%97%ef%bc%8c%e4%bb%8e%e9%9b%b6%e5%88%b0%e4%b8%80%e6%9e%84%e5%bb%ba%e4%bd%a0\/"},"modified":"2026-06-03T21:42:49","modified_gmt":"2026-06-03T13:42:49","slug":"wordpress-plugin-development-guide-from-scratch","status":"publish","type":"knowledge_post","link":"https:\/\/www.likacloud.com\/tr\/knowledge\/wordpress\/wordpress-plugin-development-guide-from-scratch\/","title":{"rendered":"Bir WordPress eklentisi geli\u015ftirmenin eksiksiz bir rehberi, ilk eklentinizi s\u0131f\u0131rdan bire kadar olu\u015fturma."},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5728\u4e92\u8054\u7f51\u7684\u5e7f\u9614\u5929\u5730\u4e2d\uff0cWordPress \u4ee5\u5176\u5f3a\u5927\u7684\u53ef\u6269\u5c55\u6027\u5360\u636e\u4e86\u5185\u5bb9\u7ba1\u7406\u7cfb\u7edf\u7684\u534a\u58c1\u6c5f\u5c71\u3002\u800c\u8d4b\u4e88\u5176\u65e0\u5c3d\u6269\u5c55\u80fd\u529b\u7684\u6838\u5fc3\uff0c\u4fbf\u662f\u63d2\u4ef6\u3002\u901a\u8fc7 WordPress \u63d2\u4ef6\u5f00\u53d1\uff0c\u4f60\u53ef\u4ee5\u4e3a\u7f51\u7ad9\u6dfb\u52a0\u4efb\u4f55\u4f60\u80fd\u60f3\u8c61\u7684\u529f\u80fd\u3002\u672c\u6587\u5c06\u624b\u628a\u624b\u5e26\u4f60\u4ece\u96f6\u5f00\u59cb\uff0c\u6784\u5efa\u4f60\u7684\u7b2c\u4e00\u4e2a WordPress \u63d2\u4ef6\uff0c\u6df1\u5165\u7406\u89e3\u5176\u6838\u5fc3\u7ed3\u6784\u4e0e\u5f00\u53d1\u6d41\u7a0b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">WordPress \u63d2\u4ef6\u57fa\u7840\u4e0e\u5f00\u53d1\u73af\u5883\u642d\u5efa<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f00\u59cb\u7f16\u7801\u4e4b\u524d\uff0c\u7406\u89e3 WordPress \u63d2\u4ef6\u7684\u672c\u8d28\u5e76\u642d\u5efa\u4e00\u4e2a\u5408\u9002\u7684\u5f00\u53d1\u73af\u5883\u81f3\u5173\u91cd\u8981\u3002\u4e00\u4e2a\u63d2\u4ef6\u672c\u8d28\u4e0a\u662f\u4e00\u4e2a\u6216\u591a\u4e2a PHP \u6587\u4ef6\uff0c\u9075\u5faa WordPress \u7684\u89c4\u8303\uff0c\u901a\u8fc7\u7279\u5b9a\u7684<code>\u94a9\u5b50<\/code>\uff08Hooks\uff09\u4e0e\u6838\u5fc3\u7cfb\u7edf\u8fdb\u884c\u4ea4\u4e92\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u63d2\u4ef6\u7684\u57fa\u672c\u5b9a\u4e49<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6bcf\u4e2a\u63d2\u4ef6\u90fd\u5fc5\u987b\u6709\u4e00\u4e2a\u552f\u4e00\u7684\u4e3b\u6587\u4ef6\uff0c\u5e76\u5728\u5176\u5934\u90e8\u4ee5\u7279\u5b9a\u683c\u5f0f\u7684\u6ce8\u91ca\u58f0\u660e\u63d2\u4ef6\u4fe1\u606f\u3002\u8fd9\u6bb5\u6ce8\u91ca\u662f WordPress \u5728\u63d2\u4ef6\u7ba1\u7406\u9875\u9762\u8bc6\u522b\u5e76\u663e\u793a\u63d2\u4ef6\u540d\u79f0\u3001\u63cf\u8ff0\u3001\u7248\u672c\u7b49\u5143\u6570\u636e\u7684\u4f9d\u636e\u3002<\/p>\n<!-- AUTO_INTERNAL_LINKS_START --><p>\u63a8\u8350\u9605\u8bfb <a href=\"https:\/\/www.likacloud.com\/zh-hant\/knowledge\/wordpress\/plugin-development-guide-build-first-wordpress-extension\/\">\u63ed\u79d8\u63d2\u4ef6\u5f00\u53d1\uff1a\u4ece\u96f6\u6784\u5efa\u4f60\u7684\u7b2c\u4e00\u4e2a\u6269\u5c55<\/a>\u3002<\/p><!-- AUTO_INTERNAL_LINKS_END -->\n\n\n\n\n<h3 class=\"wp-block-heading\">\u672c\u5730\u5f00\u53d1\u73af\u5883\u914d\u7f6e<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e3a\u4e86\u9ad8\u6548\u4e14\u5b89\u5168\u5730\u8fdb\u884c\u5f00\u53d1\uff0c\u5f3a\u70c8\u5efa\u8bae\u4f7f\u7528\u672c\u5730\u670d\u52a1\u5668\u73af\u5883\u3002\u4f60\u53ef\u4ee5\u9009\u62e9 XAMPP\u3001MAMP\u3001Local by Flywheel \u6216 Docker \u7b49\u5de5\u5177\u3002\u6838\u5fc3\u8981\u6c42\u662f\u5b89\u88c5\u597d PHP\uff08\u7248\u672c\u9700\u4e0e\u4f60\u7684\u76ee\u6807\u670d\u52a1\u5668\u517c\u5bb9\uff09\u3001MySQL\/MariaDB \u548c Apache\/Nginx\u3002\u4e4b\u540e\uff0c\u4e0b\u8f7d\u6700\u65b0\u7684 WordPress \u6838\u5fc3\u6587\u4ef6\u5e76\u5b8c\u6210\u5b89\u88c5\u3002<\/p>\n<!-- AUTO_SYNCED_PATTERN_INSERT_START -->\n\r\n<div class=\"flex justify-between items-center flex-col lg:flex-row xl:flex-col 2xl:flex-row gap-6 sm:gap-8 rounded-lg border border-gray-200 dark:border-gray-700 p-4 mb-8 lg:mb-10 sm:p-6 bg-white dark:bg-gray-750 shadow-md transition-colors duration-300\"\r\n     data-link=\"https:\/\/www.likacloud.com\/tr\/tolink\/ultahost-wordpress-hosting\/\">\r\n     \r\n  <div class=\"flex flex-col gap-3 gap-4 sm:gap-6 w-full\">\r\n    <strong class=\"text-2xl font-semibold text-gray-900 dark:text-gray-200\">\r\n      UltaHost WordPress \u4e3b\u673a    <\/strong>\r\n    <div class=\"text-gray-600 dark:text-gray-300 word-word\">30\u5929\u9000\u6b3e\u4fdd\u8bc1\uff0c\u65e0\u9650\u5e26\u5bbd\u4e0e\u6570\u636e\u5e93\uff0c\u514d\u8d39\u7684 DDoS \u9632\u62a4\uff0c\u8d2d\u4e703\u5e74\u4f18\u60e050%<\/div>\r\n  <\/div>\r\n\r\n  <div class=\"flex items-center flex-col md:flex-row lg:flex-col xl:flex-row 2xl:flex-col gap-6 shrink-0\">\r\n          <a href=\"https:\/\/www.likacloud.com\/tr\/tolink\/ultahost-wordpress-hosting\/\">\r\n                  <img decoding=\"async\" src=\"https:\/\/www.likacloud.com\/wp-content\/uploads\/2025\/12\/20251227020448.webp\" alt=\"UltaHost LOGO\" class=\"content-promotion-card-icon h-9 min-h-9 dark:hidden\" title=\"\">\r\n          <img decoding=\"async\" src=\"https:\/\/www.likacloud.com\/wp-content\/uploads\/2025\/12\/20251229052118.webp\" alt=\"UltaHost LOGO\" class=\"content-promotion-card-icon h-9 min-h-9 hidden dark:block\" title=\"\">\r\n              <\/a>\r\n    \r\n    <a href=\"https:\/\/www.likacloud.com\/tr\/tolink\/ultahost-wordpress-hosting\/\"\r\n       class=\"bg-blue-500 w-full md:w-auto lg:w-full xl:w-auto 2xl:w-full text-center !text-white dark:!text-gray-200 !px-5 !py-1.5 rounded-full hover:bg-blue-600 transition-colors\">\r\n       \u8bbf\u95ee\u9875\u9762    <\/a>\r\n  <\/div>\r\n<\/div>\n<!-- AUTO_SYNCED_PATTERN_INSERT_END -->\n\n\n\n\n\n<h2 class=\"wp-block-heading\">\u521b\u5efa\u4f60\u7684\u7b2c\u4e00\u4e2a\u63d2\u4ef6\uff1a\u95ee\u5019\u8bed\u5c0f\u5de5\u5177<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5728\uff0c\u8ba9\u6211\u4eec\u52a8\u624b\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u63d2\u4ef6\u3002\u8fd9\u4e2a\u63d2\u4ef6\u7684\u529f\u80fd\u662f\uff1a\u5728\u7f51\u7ad9\u7684\u6587\u7ae0\u5185\u5bb9\u672b\u5c3e\uff0c\u81ea\u52a8\u6dfb\u52a0\u4e00\u53e5\u81ea\u5b9a\u4e49\u7684\u95ee\u5019\u8bed\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9996\u5148\uff0c\u5728 WordPress \u7684 <code>wp-content\/plugins<\/code> \u76ee\u5f55\u4e0b\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\u5939\uff0c\u547d\u540d\u4e3a <code>my-first-greeting-plugin<\/code>\u3002\u7136\u540e\uff0c\u5728\u8be5\u6587\u4ef6\u5939\u5185\u521b\u5efa\u4e3b PHP \u6587\u4ef6\uff0c\u53ef\u4ee5\u547d\u540d\u4e3a <code>my-first-greeting-plugin.php<\/code>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u63d2\u4ef6\u5934\u90e8\u4fe1\u606f\u58f0\u660e<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6253\u5f00\u4e3b\u6587\u4ef6\uff0c\u8f93\u5165\u4ee5\u4e0b\u4ee3\u7801\u6765\u5b9a\u4e49\u63d2\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-php\">&lt;?php\n\/**\n * Plugin Name:       \u6211\u7684\u7b2c\u4e00\u4e2a\u95ee\u5019\u8bed\u63d2\u4ef6\n * Plugin URI:        https:\/\/yourwebsite.com\/my-first-greeting-plugin\n * Description:       \u8fd9\u662f\u4e00\u4e2a\u7ec3\u4e60\u7528\u7684\u63d2\u4ef6\uff0c\u7528\u4e8e\u5728\u6587\u7ae0\u672b\u5c3e\u6dfb\u52a0\u95ee\u5019\u8bed\u3002\n * Version:           1.0.0\n * Author:            \u4f60\u7684\u540d\u5b57\n * Author URI:        https:\/\/yourwebsite.com\n * License:           GPL v2 or later\n * Text Domain:       my-first-greeting-plugin\n *\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4fdd\u5b58\u6587\u4ef6\u540e\uff0c\u8fdb\u5165 WordPress \u540e\u53f0\u7684\u201c\u63d2\u4ef6\u201d\u9875\u9762\uff0c\u4f60\u5e94\u8be5\u80fd\u770b\u5230\u8fd9\u4e2a\u65b0\u63d2\u4ef6\u51fa\u73b0\u5728\u63d2\u4ef6\u5217\u8868\u4e2d\uff0c\u5e76\u4e14\u53ef\u4ee5\u6fc0\u6d3b\u5b83\u3002\u5f53\u7136\uff0c\u76ee\u524d\u5b83\u8fd8\u6ca1\u6709\u4efb\u4f55\u529f\u80fd\u3002<\/p>\n<!-- AUTO_INTERNAL_LINKS_START --><p>\u63a8\u8350\u9605\u8bfb <a href=\"https:\/\/www.likacloud.com\/zh-hant\/knowledge\/wordpress\/woocommerce-performance-optimization-tips-guide\/\">WooCommerce \u7535\u5546\u7f51\u7ad9\u6027\u80fd\u4f18\u5316\u7684 10 \u4e2a\u5173\u952e\u6280\u5de7\u4e0e\u5b9e\u6218\u6307\u5357<\/a>\u3002<\/p><!-- AUTO_INTERNAL_LINKS_END -->\n\n\n\n\n<h3 class=\"wp-block-heading\">\u4f7f\u7528\u94a9\u5b50\u6dfb\u52a0\u6838\u5fc3\u529f\u80fd<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress \u7684\u8fd0\u884c\u4e25\u91cd\u4f9d\u8d56\u4e8e\u201c\u94a9\u5b50\u201d\u673a\u5236\uff0c\u5206\u4e3a<code>\u52a8\u4f5c\u94a9\u5b50<\/code>\uff08Action Hooks\uff09\u548c<code>\u8fc7\u6ee4\u5668\u94a9\u5b50<\/code>\uff08Filter Hooks\uff09\u3002\u6211\u4eec\u8981\u5728\u6587\u7ae0\u5185\u5bb9\u540e\u6dfb\u52a0\u6587\u5b57\uff0c\u9700\u8981\u4f7f\u7528 <code>the_content<\/code> \u8fd9\u4e2a\u8fc7\u6ee4\u5668\u94a9\u5b50\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u4e3b\u6587\u4ef6\u7684\u5934\u90e8\u6ce8\u91ca\u4e0b\u65b9\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u51fd\u6570\u548c\u94a9\u5b50\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-php\">\/\/ \u5b9a\u4e49\u5411\u6587\u7ae0\u5185\u5bb9\u6dfb\u52a0\u95ee\u5019\u8bed\u7684\u51fd\u6570\nfunction mfgp_add_greeting_to_content( $content ) {\n    \/\/ \u786e\u4fdd\u53ea\u5728\u4e3b\u5faa\u73af\u7684\u5355\u7bc7\u6587\u7ae0\u9875\u9762\u663e\u793a\n    if ( is_single() &amp;&amp; in_the_loop() &amp;&amp; is_main_query() ) {\n        $greeting = &#039;&lt;p style=&quot;color:#666; font-style:italic;&quot;&gt;\u611f\u8c22\u60a8\u9605\u8bfb\u672c\u6587\uff01\u795d\u4f60\u62e5\u6709\u7f8e\u597d\u7684\u4e00\u5929\uff01&lt;\/p&gt;&#039;;\n        $content .= $greeting;\n    }\n    return $content;\n}\n\/\/ \u5c06\u51fd\u6570\u6302\u8f7d\u5230 \u2018the_content\u2019 \u8fc7\u6ee4\u5668\u94a9\u5b50\u4e0a\nadd_filter( &#039;the_content&#039;, &#039;mfgp_add_greeting_to_content&#039; );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4fdd\u5b58\u6587\u4ef6\u5e76\u6fc0\u6d3b\u63d2\u4ef6\u540e\uff0c\u6253\u5f00\u7f51\u7ad9\u4e0a\u7684\u4efb\u610f\u4e00\u7bc7\u6587\u7ae0\uff0c\u6eda\u52a8\u5230\u672b\u5c3e\uff0c\u4f60\u5e94\u8be5\u80fd\u770b\u5230\u6dfb\u52a0\u7684\u95ee\u5019\u8bed\u3002\u901a\u8fc7\u8fd9\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff0c\u4f60\u5df2\u7ecf\u5b9e\u8df5\u4e86\u63d2\u4ef6\u5f00\u53d1\u4e2d\u6700\u6838\u5fc3\u7684\u6982\u5ff5\uff1a\u58f0\u660e\u63d2\u4ef6\u3001\u7f16\u5199\u529f\u80fd\u51fd\u6570\u3001\u901a\u8fc7<code>add_filter<\/code>\u6216<code>add_action<\/code>\u5c06\u51fd\u6570\u6302\u8f7d\u5230\u6b63\u786e\u7684\u94a9\u5b50\u4e0a\u3002<\/p>\n<!-- AUTO_SYNCED_PATTERN_INSERT_START -->\n\r\n<div class=\"flex justify-between items-center flex-col lg:flex-row xl:flex-col 2xl:flex-row gap-6 sm:gap-8 rounded-lg border border-gray-200 dark:border-gray-700 p-4 mb-8 lg:mb-10 sm:p-6 bg-white dark:bg-gray-750 shadow-md transition-colors duration-300\"\r\n     data-link=\"https:\/\/www.likacloud.com\/tr\/tolink\/hosting-shared-hosting\/\">\r\n     \r\n  <div class=\"flex flex-col gap-3 gap-4 sm:gap-6 w-full\">\r\n    <strong class=\"text-2xl font-semibold text-gray-900 dark:text-gray-200\">\r\n      hosting.com \u5171\u4eab\u4e3b\u673a    <\/strong>\r\n    <div class=\"text-gray-600 dark:text-gray-300 word-word\">\u9ad8\u6027\u80fd\uff0c\u914d\u5907 AMD EPYC CPU\u3001NVMe SSD \u5b58\u50a8\u548c LiteSpeed\uff0c\u5168\u5929\u501924\u5c0f\u65f6\u3001\u5168\u5929\u5019\u7684\u4e13\u5bb6\u5185\u90e8\u652f\u6301\uff0c\u9ad8\u7ea7\u5b89\u5168\u63aa\u65bd\uff0c\u5305\u62ec SSL\u3001\u66b4\u529b\u7834\u89e3\u3001\u6076\u610f\u8f6f\u4ef6\u548c DDoS \u9632\u62a4\uff0c\u8282\u7701\u9ad8\u8fbe 73%<\/div>\r\n  <\/div>\r\n\r\n  <div class=\"flex items-center flex-col md:flex-row lg:flex-col xl:flex-row 2xl:flex-col gap-6 shrink-0\">\r\n          <a href=\"https:\/\/www.likacloud.com\/tr\/tolink\/hosting-shared-hosting\/\">\r\n                  <img decoding=\"async\" src=\"https:\/\/www.likacloud.com\/wp-content\/uploads\/2025\/09\/20250901222940.svg\" alt=\"hosting.com LOGO\" class=\"content-promotion-card-icon h-9 min-h-9 dark:hidden\" title=\"\">\r\n          <img decoding=\"async\" src=\"https:\/\/www.likacloud.com\/wp-content\/uploads\/2025\/12\/20251228220957.webp\" alt=\"hosting.com LOGO\" class=\"content-promotion-card-icon h-9 min-h-9 hidden dark:block\" title=\"\">\r\n              <\/a>\r\n    \r\n    <a href=\"https:\/\/www.likacloud.com\/tr\/tolink\/hosting-shared-hosting\/\"\r\n       class=\"bg-blue-500 w-full md:w-auto lg:w-full xl:w-auto 2xl:w-full text-center !text-white dark:!text-gray-200 !px-5 !py-1.5 rounded-full hover:bg-blue-600 transition-colors\">\r\n       \u8bbf\u95ee\u9875\u9762    <\/a>\r\n  <\/div>\r\n<\/div>\n<!-- AUTO_SYNCED_PATTERN_INSERT_END -->\n\n\n\n\n\n<h2 class=\"wp-block-heading\">\u63d2\u4ef6\u529f\u80fd\u589e\u5f3a\uff1a\u6dfb\u52a0\u7ba1\u7406\u8bbe\u7f6e\u9875\u9762<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e00\u4e2a\u6210\u719f\u7684\u63d2\u4ef6\u901a\u5e38\u5141\u8bb8\u7528\u6237\u5728\u540e\u53f0\u8fdb\u884c\u914d\u7f6e\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u4e3a\u95ee\u5019\u8bed\u63d2\u4ef6\u6dfb\u52a0\u4e00\u4e2a\u7b80\u5355\u7684\u8bbe\u7f6e\u9875\u9762\uff0c\u8ba9\u7ba1\u7406\u5458\u53ef\u4ee5\u81ea\u5b9a\u4e49\u663e\u793a\u7684\u6587\u5b57\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u521b\u5efa\u7ba1\u7406\u83dc\u5355\u9879<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528<code>add_action<\/code>\u94a9\u5b50\u8c03\u7528\u4e00\u4e2a\u51fd\u6570\uff0c\u8fd9\u4e2a\u51fd\u6570\u4f1a\u4f7f\u7528 <code>add_options_page<\/code> \u51fd\u6570\u5728 WordPress \u540e\u53f0\u7684\u201c\u8bbe\u7f6e\u201d\u83dc\u5355\u4e0b\u6dfb\u52a0\u4e00\u4e2a\u5b50\u9875\u9762\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u4e3b\u6587\u4ef6\u4e2d\u7ee7\u7eed\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<!-- AUTO_INTERNAL_LINKS_START --><p>\u63a8\u8350\u9605\u8bfb <a href=\"https:\/\/www.likacloud.com\/zh-hant\/knowledge\/wordpress\/wordpress-plugin-development-guide-tutorial\/\">\u4ece\u96f6\u5230\u4e00\uff1aWordPress\u63d2\u4ef6\u5f00\u53d1\u5b8c\u6574\u6307\u5357\u4e0e\u5b9e\u6218\u6559\u7a0b<\/a>\u3002<\/p><!-- AUTO_INTERNAL_LINKS_END -->\n\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-php\">\/\/ \u6dfb\u52a0\u8bbe\u7f6e\u83dc\u5355\nfunction mfgp_add_admin_menu() {\n    add_options_page(\n        &#039;\u95ee\u5019\u8bed\u63d2\u4ef6\u8bbe\u7f6e&#039;,          \/\/ \u9875\u9762\u6807\u9898\n        &#039;\u81ea\u5b9a\u4e49\u95ee\u5019\u8bed&#039;,           \/\/ \u83dc\u5355\u6807\u9898\n        &#039;manage_options&#039;,         \/\/ \u6743\u9650\u8981\u6c42\uff08\u7ba1\u7406\u5458\uff09\n        &#039;my-greeting-plugin&#039;,     \/\/ \u83dc\u5355 Slug\n        &#039;mfgp_settings_page_html&#039; \/\/ \u7528\u4e8e\u8f93\u51fa\u9875\u9762\u5185\u5bb9\u7684\u56de\u8c03\u51fd\u6570\n    );\n}\nadd_action( &#039;admin_menu&#039;, &#039;mfgp_add_admin_menu&#039; );<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u6784\u5efa\u8bbe\u7f6e\u9875\u9762\u4e0e\u4fdd\u5b58\u903b\u8f91<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5728\uff0c\u6211\u4eec\u9700\u8981\u5b9a\u4e49\u4e0a\u9762\u56de\u8c03\u51fd\u6570 <code>mfgp_settings_page_html<\/code> \u6765\u6e32\u67d3\u8bbe\u7f6e\u9875\u9762\u7684 HTML \u8868\u5355\uff0c\u5e76\u5904\u7406\u8868\u5355\u6570\u636e\u7684\u4fdd\u5b58\u3002WordPress \u63d0\u4f9b\u4e86\u8bbe\u7f6e API \u6765\u7b80\u5316\u6b64\u8fc7\u7a0b\uff0c\u4f46\u4e3a\u4e86\u6e05\u6670\u7406\u89e3\u6d41\u7a0b\uff0c\u6211\u4eec\u5148\u4f7f\u7528\u57fa\u7840\u65b9\u6cd5\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-php\">\/\/ \u5b9a\u4e49\u8bbe\u7f6e\u9875\u9762\u7684 HTML \u7ed3\u6784\nfunction mfgp_settings_page_html() {\n    \/\/ \u68c0\u67e5\u7528\u6237\u6743\u9650\n    if ( !current_user_can( &#039;manage_options&#039; ) ) {\n        return;\n    }\n\n\/\/ \u5904\u7406\u8868\u5355\u63d0\u4ea4\uff08\u975e\u8bbe\u7f6eAPI\u65b9\u5f0f\uff09\n    if ( isset( $_POST[&#039;mfgp_greeting_text&#039;] ) ) {\n        \/\/ \u9a8c\u8bc1 Nonce \u786e\u4fdd\u8bf7\u6c42\u6765\u6e90\u5b89\u5168\n        check_admin_referer( &#039;mfgp_save_settings&#039; );\n        \/\/ \u6e05\u7406\u5e76\u4fdd\u5b58\u8f93\u5165\u7684\u6570\u636e\n        $greeting_text = sanitize_textarea_field( $_POST[&#039;mfgp_greeting_text&#039;] );\n        update_option( &#039;mfgp_custom_greeting&#039;, $greeting_text );\n        echo &#039;&lt;div class=&quot;notice notice-success is-dismissible&quot;&gt;&lt;p&gt;\u8bbe\u7f6e\u5df2\u4fdd\u5b58\uff01&lt;\/p&gt;&lt;\/div&gt;&#039;;\n    }\n\n\/\/ \u83b7\u53d6\u5df2\u4fdd\u5b58\u7684\u95ee\u5019\u8bed\n    $saved_greeting = get_option( &#039;mfgp_custom_greeting&#039;, &#039;\u611f\u8c22\u60a8\u9605\u8bfb\u672c\u6587\uff01\u795d\u4f60\u62e5\u6709\u7f8e\u597d\u7684\u4e00\u5929\uff01&#039; );\n    ?&gt;\n    &lt;div class=&quot;wrap&quot;&gt;\n        &lt;h1&gt;&lt;?php echo esc_html( get_admin_page_title() ); ?&gt;&lt;\/h1&gt;\n        &lt;form method=&quot;post&quot;&gt;\n            &lt;?php wp_nonce_field( &#039;mfgp_save_settings&#039; ); ?&gt;\n            &lt;table class=&quot;form-table&quot;&gt;\n                &lt;tr&gt;\n                    &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;mfgp_greeting_text&quot;&gt;\u81ea\u5b9a\u4e49\u95ee\u5019\u8bed&lt;\/label&gt;&lt;\/th&gt;\n                    &lt;td&gt;\n                        &lt;textarea name=&quot;mfgp_greeting_text&quot; id=&quot;mfgp_greeting_text&quot; rows=&quot;5&quot; cols=&quot;50&quot; class=&quot;large-text&quot;&gt;&lt;?php echo esc_textarea( $saved_greeting ); ?&gt;&lt;\/textarea&gt;\n                        &lt;p class=&quot;description&quot;&gt;\u8fd9\u6bb5\u6587\u5b57\u5c06\u663e\u793a\u5728\u6bcf\u7bc7\u6587\u7ae0\u7684\u672b\u5c3e\u3002&lt;\/p&gt;\n                    &lt;\/td&gt;\n                &lt;\/tr&gt;\n            &lt;\/table&gt;\n            &lt;?php submit_button( &#039;\u4fdd\u5b58\u66f4\u6539&#039; ); ?&gt;\n        &lt;\/form&gt;\n    &lt;\/div&gt;\n    &lt;?php\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u66f4\u65b0\u524d\u7aef\u8f93\u51fa\u51fd\u6570<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u540e\uff0c\u6211\u4eec\u9700\u8981\u4fee\u6539\u4e4b\u524d\u7684\u524d\u7aef\u8f93\u51fa\u51fd\u6570\uff0c\u4f7f\u5176\u4ece\u6570\u636e\u5e93\u7684\u9009\u9879\uff08<code>get_option<\/code>\uff09\u4e2d\u8bfb\u53d6\u95ee\u5019\u8bed\uff0c\u800c\u4e0d\u662f\u4f7f\u7528\u786c\u7f16\u7801\u7684\u6587\u5b57\u3002<\/p>\n<!-- AUTO_SYNCED_PATTERN_INSERT_START -->\n\r\n<div class=\"flex justify-between items-center flex-col lg:flex-row xl:flex-col 2xl:flex-row gap-6 sm:gap-8 rounded-lg border border-gray-200 dark:border-gray-700 p-4 mb-8 lg:mb-10 sm:p-6 bg-white dark:bg-gray-750 shadow-md transition-colors duration-300\"\r\n     data-link=\"https:\/\/www.likacloud.com\/tr\/tolink\/interserver-webhosting\/\">\r\n     \r\n  <div class=\"flex flex-col gap-3 gap-4 sm:gap-6 w-full\">\r\n    <strong class=\"text-2xl font-semibold text-gray-900 dark:text-gray-200\">\r\n      InterServer \u5171\u4eab\u4e3b\u673a    <\/strong>\r\n    <div class=\"text-gray-600 dark:text-gray-300 word-word\">\u5171\u4eab\u4e3b\u673a\u6bcf\u6708 $2.50 USD , \u9996\u6708 $0.1 USD \u4f18\u60e0\u7801 tryinterserver, 461\u4e2a\u4e91\u5e94\u7528\u811a\u672c\uff0c\u4e00\u952e\u5b89\u88c5\u3002<\/div>\r\n  <\/div>\r\n\r\n  <div class=\"flex items-center flex-col md:flex-row lg:flex-col xl:flex-row 2xl:flex-col gap-6 shrink-0\">\r\n          <a href=\"https:\/\/www.likacloud.com\/tr\/tolink\/interserver-webhosting\/\">\r\n                  <img decoding=\"async\" src=\"https:\/\/www.likacloud.com\/wp-content\/uploads\/2025\/12\/20251228045033.svg\" alt=\"InterServer LOGO\" class=\"content-promotion-card-icon h-9 min-h-9 dark:hidden\" title=\"\">\r\n          <img decoding=\"async\" src=\"https:\/\/www.likacloud.com\/wp-content\/uploads\/2025\/12\/20251229054830.webp\" alt=\"InterServer LOGO\" class=\"content-promotion-card-icon h-9 min-h-9 hidden dark:block\" title=\"\">\r\n              <\/a>\r\n    \r\n    <a href=\"https:\/\/www.likacloud.com\/tr\/tolink\/interserver-webhosting\/\"\r\n       class=\"bg-blue-500 w-full md:w-auto lg:w-full xl:w-auto 2xl:w-full text-center !text-white dark:!text-gray-200 !px-5 !py-1.5 rounded-full hover:bg-blue-600 transition-colors\">\r\n       \u8bbf\u95ee\u9875\u9762    <\/a>\r\n  <\/div>\r\n<\/div>\n<!-- AUTO_SYNCED_PATTERN_INSERT_END -->\n\n\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-php\">function mfgp_add_greeting_to_content( $content ) {\n    if ( is_single() &amp;&amp; in_the_loop() &amp;&amp; is_main_query() ) {\n        \/\/ \u4ece\u6570\u636e\u5e93\u9009\u9879\u4e2d\u83b7\u53d6\u95ee\u5019\u8bed\uff0c\u5982\u679c\u6ca1\u6709\u5219\u4f7f\u7528\u9ed8\u8ba4\u503c\n        $greeting_text = get_option( &#039;mfgp_custom_greeting&#039;, &#039;\u611f\u8c22\u60a8\u9605\u8bfb\u672c\u6587\uff01\u795d\u4f60\u62e5\u6709\u7f8e\u597d\u7684\u4e00\u5929\uff01&#039; );\n        if ( ! empty( $greeting_text ) ) {\n            $greeting = &#039;&lt;p style=&quot;color:#666; font-style:italic;&quot;&gt;&#039; . esc_html( $greeting_text ) . &#039;&lt;\/p&gt;&#039;;\n            $content .= $greeting;\n        }\n    }\n    return $content;\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5728\uff0c\u7ba1\u7406\u5458\u53ef\u4ee5\u5728\u201c\u8bbe\u7f6e\u201d -&gt; \u201c\u81ea\u5b9a\u4e49\u95ee\u5019\u8bed\u201d\u9875\u9762\u4e2d\u81ea\u7531\u4fee\u6539\u663e\u793a\u7684\u6587\u5b57\u4e86\uff0c\u524d\u7aef\u5c55\u793a\u4f1a\u5373\u65f6\u66f4\u65b0\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u63d2\u4ef6\u53d1\u5e03\u51c6\u5907\uff1a\u56fd\u9645\u5316\u4e0e\u5b89\u5168\u5f3a\u5316<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u5c06\u63d2\u4ef6\u5206\u4eab\u7ed9\u4ed6\u4eba\u6216\u63d0\u4ea4\u5230\u5b98\u65b9\u76ee\u5f55\u524d\uff0c\u8fd8\u9700\u8981\u8fdb\u884c\u4e00\u4e9b\u91cd\u8981\u7684\u6536\u5c3e\u5de5\u4f5c\uff0c\u4e3b\u8981\u662f\u56fd\u9645\u5316\u548c\u5b89\u5168\u5f3a\u5316\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9e\u73b0\u6587\u672c\u56fd\u9645\u5316<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u56fd\u9645\u5316\uff08i18n\uff09\u8ba9\u4f60\u7684\u63d2\u4ef6\u53ef\u4ee5\u88ab\u7ffb\u8bd1\u6210\u5176\u4ed6\u8bed\u8a00\u3002\u4f60\u9700\u8981\u5c06\u6240\u6709\u9762\u5411\u7528\u6237\u7684\u5b57\u7b26\u4e32\u7528\u7279\u5b9a\u7684\u51fd\u6570\u5305\u88f9\u8d77\u6765\u3002\u4fee\u6539\u6211\u4eec\u63d2\u4ef6\u4e2d\u7684\u5b57\u7b26\u4e32\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1.  \u5728\u63d2\u4ef6\u5934\u90e8\u6ce8\u91ca\u4e2d\uff0c\u6211\u4eec\u5df2\u7ecf\u5b9a\u4e49\u4e86 <code>Text Domain<\/code>\u3002<br \/>\n2.  \u5728\u4ee3\u7801\u4e2d\uff0c\u4f7f\u7528 <code>()<\/code> \u6216 <code>esc_html()<\/code> \u51fd\u6570\u5305\u88f9\u5b57\u7b26\u4e32\u3002\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-php\">    \/\/ \u5728\u8bbe\u7f6e\u9875\u9762\u51fd\u6570\u4e2d\n    $greeting_text = get_option( &#039;mfgp_custom_greeting&#039;, __( \u2018\u611f\u8c22\u60a8\u9605\u8bfb\u672c\u6587\uff01\u795d\u4f60\u62e5\u6709\u7f8e\u597d\u7684\u4e00\u5929\uff01\u2019\uff0c \u2018my-first-greeting-plugin\u2019 ) );\n    echo \u2018&lt;h1&gt;\u2019 . esc_html__( \u2018\u95ee\u5019\u8bed\u63d2\u4ef6\u8bbe\u7f6e\u2019\uff0c \u2018my-first-greeting-plugin\u2019 ) . \u2018&lt;\/h1&gt;\u2019;\n\n\/\/ \u5728\u524d\u7aef\u8f93\u51fa\u51fd\u6570\u4e2d\uff08\u6ce8\u610f\uff1a\u524d\u7aef\u8f93\u51fa\u901a\u5e38\u4e0d\u9700\u8981\u7ffb\u8bd1\uff0c\u9664\u975e\u662f\u4e3b\u9898\u6216\u7528\u6237\u51b3\u5b9a\uff09\n    \/\/ \u4f46\u5982\u679c\u95ee\u5019\u8bed\u672c\u8eab\u9700\u8981\u591a\u8bed\u8a00\uff0c\u53ef\u80fd\u9700\u8981\u66f4\u590d\u6742\u7684\u903b\u8f91\u3002<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">3.  \u4f7f\u7528\u5de5\u5177\u5982 Poedit \u521b\u5efa <code>.pot<\/code> \u6a21\u677f\u6587\u4ef6\uff0c\u7ffb\u8bd1\u4eba\u5458\u53ef\u4ee5\u636e\u6b64\u521b\u5efa <code>.po<\/code> \u548c <code>.mo<\/code> \u6587\u4ef6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u52a0\u5f3a\u5b89\u5168\u9632\u62a4<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u5168\u81f3\u5173\u91cd\u8981\u3002\u6211\u4eec\u5df2\u7ecf\u4f7f\u7528\u4e86\u4e00\u4e9b\u5b89\u5168\u51fd\u6570\uff0c\u5982<code>sanitize_textarea_field<\/code>\u3001<code>esc_html<\/code>\u3001<code>esc_textarea<\/code>\u548c<code>wp_nonce_field<\/code>\u3002\u6b64\u5916\uff0c\u8fd8\u9700\u8981\u6ce8\u610f\uff1a<br \/>\n*   \u6743\u9650\u68c0\u67e5\uff1a\u5728\u7ba1\u7406\u9875\u9762\u51fd\u6570\u5f00\u59cb\u5904\u4f7f\u7528 <code>current_user_can<\/code> \u8fdb\u884c\u68c0\u67e5\u3002<br \/>\n*   \u6570\u636e\u9a8c\u8bc1\u4e0e\u6e05\u7406\uff1a\u5bf9\u6240\u6709\u7528\u6237\u8f93\u5165\uff08\u5982 $_POST, $_GET\uff09\u8fdb\u884c\u9a8c\u8bc1\uff08\u662f\u5426\u7b26\u5408\u9884\u671f\u683c\u5f0f\uff09\u548c\u6e05\u7406\uff08\u79fb\u9664\u975e\u6cd5\u5b57\u7b26\uff09\u3002<br \/>\n*   \u975e\u7ade\u6001\u6761\u4ef6\u66f4\u65b0\uff1a\u5bf9\u4e8e\u91cd\u8981\u7684\u9009\u9879\uff0c\u8003\u8651\u4f7f\u7528 <code>wp_options<\/code> \u8868\u65f6\uff0c\u66f4\u5b89\u5168\u7684\u65b9\u5f0f\u662f\u4f7f\u7528 Settings API\uff0c\u5b83\u5185\u7f6e\u4e86\u975e\u7ade\u6001\uff08nonce\uff09\u548c\u6743\u9650\u68c0\u67e5\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u603b\u7ed3<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7\u672c\u6307\u5357\uff0c\u6211\u4eec\u5b8c\u6210\u4e86\u4e00\u4e2a\u529f\u80fd\u5b8c\u6574\u7684 WordPress \u63d2\u4ef6\u4ece\u521b\u5efa\u5230\u53d1\u5e03\u7684\u5b8c\u6574\u65c5\u7a0b\u3002\u6211\u4eec\u4ece\u7406\u89e3\u63d2\u4ef6\u57fa\u7840\u5f00\u59cb\uff0c\u521b\u5efa\u4e86\u5e26\u6709\u6807\u51c6\u5934\u90e8\u4fe1\u606f\u7684\u4e3b\u6587\u4ef6\uff1b\u7136\u540e\u901a\u8fc7\u4e00\u4e2a\u7b80\u5355\u7684\u95ee\u5019\u8bed\u529f\u80fd\uff0c\u5b9e\u8df5\u4e86 WordPress \u6700\u6838\u5fc3\u7684\u94a9\u5b50\u673a\u5236\uff1b\u63a5\u7740\uff0c\u6211\u4eec\u4e3a\u63d2\u4ef6\u6dfb\u52a0\u4e86\u540e\u53f0\u8bbe\u7f6e\u9875\u9762\uff0c\u5b9e\u73b0\u4e86\u7528\u6237\u53ef\u914d\u7f6e\u6027\uff1b\u6700\u540e\uff0c\u6211\u4eec\u63a2\u8ba8\u4e86\u53d1\u5e03\u524d\u7684\u5173\u952e\u6b65\u9aa4\u2014\u2014\u56fd\u9645\u5316\u548c\u5b89\u5168\u5f3a\u5316\u3002\u6bcf\u4e2a\u6b65\u9aa4\u90fd\u5305\u542b\u4e86\u6838\u5fc3\u7684 WordPress \u51fd\u6570\u548c\u6700\u4f73\u5b9e\u8df5\u3002\u638c\u63e1\u8fd9\u4e9b\u57fa\u7840\u77e5\u8bc6\u540e\uff0c\u4f60\u5c31\u53ef\u4ee5\u5c1d\u8bd5\u5f00\u53d1\u66f4\u590d\u6742\u3001\u66f4\u6709\u521b\u610f\u7684\u63d2\u4ef6\uff0c\u4e3a\u5168\u7403\u7684 WordPress \u751f\u6001\u7cfb\u7edf\u8d21\u732e\u529b\u91cf\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ \u5e38\u89c1\u95ee\u9898<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u5f00\u53d1 WordPress \u63d2\u4ef6\u9700\u8981\u54ea\u4e9b\u5148\u51b3\u77e5\u8bc6\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f60\u9700\u8981\u5177\u5907\u57fa\u672c\u7684 PHP \u7f16\u7a0b\u77e5\u8bc6\uff0c\u4e86\u89e3 HTML \u548c CSS\uff0c\u5e76\u4e14\u5bf9 WordPress \u7684\u57fa\u672c\u64cd\u4f5c\uff08\u5982\u6587\u7ae0\u3001\u9875\u9762\u3001\u83dc\u5355\uff09\u6709\u4e00\u5b9a\u4e86\u89e3\u3002\u719f\u6089\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\uff08OOP\uff09\u4e0d\u662f\u5fc5\u987b\u7684\uff0c\u4f46\u4f1a\u5bf9\u5f00\u53d1\u5927\u578b\u63d2\u4ef6\u6709\u5f88\u5927\u5e2e\u52a9\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e3a\u4ec0\u4e48\u6211\u7684\u63d2\u4ef6\u6fc0\u6d3b\u540e\u6ca1\u6709\u5728\u540e\u53f0\u83dc\u5355\u4e2d\u663e\u793a\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u5e38\u89c1\u7684\u539f\u56e0\u662f\u6743\u9650\u95ee\u9898\u3002\u8bf7\u68c0\u67e5\u4f60\u5728\u8c03\u7528<code>add_options_page<\/code>\u6216\u7c7b\u4f3c\u51fd\u6570\u65f6\uff0c\u7b2c\u4e8c\u4e2a\u53c2\u6570\uff08 capability \uff09\u662f\u5426\u8bbe\u7f6e\u6b63\u786e\uff0c\u5982 <code>\u2018manage_options\u2019<\/code>\u3002\u6b64\u5916\uff0c\u8bf7\u786e\u4fdd\u4f60\u7684\u51fd\u6570\u5df2\u88ab\u6b63\u786e\u5730\u901a\u8fc7<code>add_action( \u2018admin_menu\u2019\uff0c ...)<\/code>\u94a9\u5b50\u6302\u8f7d\uff0c\u5e76\u4e14\u6ca1\u6709\u8bed\u6cd5\u9519\u8bef\u5bfc\u81f4\u51fd\u6570\u672a\u6267\u884c\u3002\u4f60\u53ef\u4ee5\u5728\u4ee3\u7801\u5f00\u5934\u6dfb\u52a0<code>error_log<\/code>\u51fd\u6570\u6765\u8c03\u8bd5\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5982\u4f55\u8c03\u8bd5\u6211\u7684 WordPress \u63d2\u4ef6\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u9996\u5148\uff0c\u786e\u4fdd\u5728\u4f60\u7684 <code>wp-config.php<\/code> \u6587\u4ef6\u4e2d\u5f00\u542f\u4e86 WordPress \u8c03\u8bd5\u6a21\u5f0f\uff1a\u5c06 <code>define( \u2018WP_DEBUG\u2019\uff0c true );<\/code> \u548c <code>define( \u2018WP_DEBUG_LOG\u2019\uff0c true );<\/code>\u3002\u8fd9\u6837\u9519\u8bef\u4fe1\u606f\u4f1a\u8bb0\u5f55\u5230 <code>\/wp-content\/debug.log<\/code> \u6587\u4ef6\u4e2d\u3002\u5176\u6b21\uff0c\u53ef\u4ee5\u4f7f\u7528\u6d4f\u89c8\u5668\u5f00\u53d1\u8005\u5de5\u5177\u7684\u201c\u63a7\u5236\u53f0\u201d\u548c\u201c\u7f51\u7edc\u201d\u9009\u9879\u5361\u8fdb\u884c\u524d\u7aef\u8c03\u8bd5\u3002\u5bf9\u4e8e\u590d\u6742\u7684\u903b\u8f91\uff0c\u4f7f\u7528<code>error_log( print_r( $variable\uff0c true ) );<\/code>\u5c06\u53d8\u91cf\u503c\u8f93\u51fa\u5230\u65e5\u5fd7\u4e2d\u662f\u5e38\u7528\u65b9\u6cd5\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6211\u7684\u63d2\u4ef6\u5982\u4f55\u4e0e\u5176\u4ed6\u63d2\u4ef6\u6216\u4e3b\u9898\u517c\u5bb9\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e3a\u4e86\u6700\u5927\u7a0b\u5ea6\u4fdd\u8bc1\u517c\u5bb9\u6027\uff0c\u4f60\u7684\u63d2\u4ef6\u5e94\u8be5\uff1a1\uff09\u4f7f\u7528\u72ec\u7279\u7684\u524d\u7f00\u547d\u540d\u6240\u6709\u51fd\u6570\u3001\u7c7b\u3001\u53d8\u91cf\u548c\u9009\u9879\uff08\u5982\u6211\u4eec\u4f7f\u7528\u4e86<code>mfgp_<\/code>\uff09\uff0c\u907f\u514d\u547d\u540d\u51b2\u7a81\u30022\uff09\u5728\u6dfb\u52a0\u4fee\u6539\u524d\u7aef\u6216\u540e\u7aef\u6837\u5f0f\u65f6\uff0c\u5c3d\u91cf\u4f7f\u7528\u72ec\u7279\u7684\u9009\u62e9\u5668\u7c7b\u540d\u30023\uff09\u5728\u53ef\u80fd\u7684\u60c5\u51b5\u4e0b\uff0c\u63d0\u4f9b\u8fc7\u6ee4\u5668\u94a9\u5b50\uff08<code>apply_filters<\/code>\uff09\uff0c\u5141\u8bb8\u5176\u4ed6\u5f00\u53d1\u8005\u4fee\u6539\u4f60\u63d2\u4ef6\u7684\u884c\u4e3a\u30024\uff09\u907f\u514d\u76f4\u63a5\u4fee\u6539 WordPress \u6838\u5fc3\u6570\u636e\u5e93\u8868\u6216\u6587\u4ef6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bu makale, WordPress eklenti geli\u015ftirmeye yeni ba\u015flayanlar i\u00e7in bir pratik rehberdir. \u00d6ncelikle eklentilerin temel kavramlar\u0131 ve yerel geli\u015ftirme ortam\u0131n\u0131n kurulma ad\u0131mlar\u0131 anlat\u0131lmaktad\u0131r. Daha sonra, \u201cSelamla\u015fma Arac\u0131\u201d adl\u0131 bir eklentinin olu\u015fturulmas\u0131yla ilgili tam bir \u00f6rnek verilerek, eklenti dosyalar\u0131n\u0131n olu\u015fturulmas\u0131ndan, ba\u015fl\u0131k bilgilerinin belirtilmesine, filtre kancalar\u0131n\u0131n kullan\u0131larak i\u015flevlerin eklenmesine ve y\u00f6netim ayarlar\u0131n\u0131n geli\u015ftirilmesine kadar t\u00fcm geli\u015ftirme s\u00fcreci ayr\u0131nt\u0131l\u0131 bir \u015fekilde g\u00f6sterilmektedir. Bu sayede okuyucular, eklentilerin temel yap\u0131s\u0131n\u0131 ve geli\u015ftirme modellerini daha iyi anlayabilirler.<\/p>","protected":false},"author":7,"featured_media":0,"template":"","meta":{"_acf_changed":false,"footnotes":""},"tags":[118,2032,692,1927],"knowledge_category":[280],"class_list":["post-12361387","knowledge_post","type-knowledge_post","status-publish","hentry","tag-wordpress","tag-getting-started","tag-practical-guide","tag-plugin-development","knowledge_category-wordpress"],"acf":{"site_seo_keywords":"WordPress\u63d2\u4ef6\u5f00\u53d1,\u63d2\u4ef6\u5f00\u53d1\u6559\u7a0b,WordPress\u5f00\u53d1\u6307\u5357,\u4ece\u96f6\u5f00\u59cb\u5efa\u63d2\u4ef6,\u94a9\u5b50(Hooks)\u4f7f\u7528,\u63d2\u4ef6\u7ba1\u7406\u9875\u9762,PHP\u63d2\u4ef6\u5b9e\u6218,WordPress\u529f\u80fd\u6269\u5c55"},"_links":{"self":[{"href":"https:\/\/www.likacloud.com\/tr\/wp-json\/wp\/v2\/knowledge_posts\/12361387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.likacloud.com\/tr\/wp-json\/wp\/v2\/knowledge_posts"}],"about":[{"href":"https:\/\/www.likacloud.com\/tr\/wp-json\/wp\/v2\/types\/knowledge_post"}],"author":[{"embeddable":true,"href":"https:\/\/www.likacloud.com\/tr\/wp-json\/wp\/v2\/users\/7"}],"version-history":[{"count":1,"href":"https:\/\/www.likacloud.com\/tr\/wp-json\/wp\/v2\/knowledge_posts\/12361387\/revisions"}],"predecessor-version":[{"id":12404415,"href":"https:\/\/www.likacloud.com\/tr\/wp-json\/wp\/v2\/knowledge_posts\/12361387\/revisions\/12404415"}],"wp:attachment":[{"href":"https:\/\/www.likacloud.com\/tr\/wp-json\/wp\/v2\/media?parent=12361387"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.likacloud.com\/tr\/wp-json\/wp\/v2\/tags?post=12361387"},{"taxonomy":"knowledge_category","embeddable":true,"href":"https:\/\/www.likacloud.com\/tr\/wp-json\/wp\/v2\/knowledge_category?post=12361387"}],"curies":[{"name":"WP","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}