主题开发文档

发布您的主题

💡 云策文档标注

概述

本文档介绍了将主题发布到 WordPress 主题目录的要求和提交流程,包括文件准备、测试和文档步骤,旨在帮助开发者顺利通过主题审核。

关键要点

  • 发布主题前需确保具备所需的最小主题文件,并完成包括内容在内的全面测试。
  • 遵循主题审核指南以提高主题被接受的几率,提交后审核员可能要求进一步修改。
  • 主题必须兼容 GNU 通用公共许可证(推荐 GPLv2 或更高版本),且不允许包含插件、非设计相关功能(如表单)、短代码、自定义文章类型或自定义块。
  • 使用 Theme Check 插件测试主题,以确保符合最新的审核标准。

注意事项

  • 存在 3 个或更多不同问题的主题可能被拒绝批准,建议作者仔细阅读主题审核指南。
  • “如何执行审核(草案)”是深入了解审核流程的实用指南。
  • 常见遗漏要求包括许可证兼容性和功能限制,不完整主题可能被关闭。

📄 原文内容

This section covers the requirements and submission process for releasing your theme into the WordPress Theme Directory. If you’ve followed the instructions in this handbook, your theme is almost ready for release into the directory.

The first requirement to releasing your theme is to make sure you have – at a minimum – the required theme files before submitting your theme for review.

Once you’ve confirmed the required theme files, thorough testing of the theme – including content – must be completed. Following the theme review guidelines will help ensure acceptance of your theme.

After completing everything above, having the proper documentation is the final step before submitting your theme for approval. After submitting your theme for review, the theme reviewer may request other changes to your theme.

Important Notices

Themes that have 3 or more distinct issues may be closed as not-approved. Theme authors are encouraged to review the Theme Review Guidelines.

“How to do a review (Draft)” is another practical guide to understand the review process in-depth.

First Two Checks

1. Commonly missed requirements

Here are some of the commonly missed requirements at the initial review. Themes with incomplete requirements may be closed as not-approved.

  • Themes must be compatible with the GNU General Public License. GPLv2 or later is strongly recommended.
  • Themes are not allowed to include plugins and non-design related functionalities such as forms. Anything that will be deleted when user switches a theme should not be included.
  • Shortcodes, custom post types, and custom blocks are not allowed in themes.

2. Testing your theme with Theme Check Plugin

Theme Check plugin is an easy way to test your theme and ensure it’s up to spec with the latest theme review standards. Learn more about Theme Check Plugin.