主题开发文档

💡 云策文档标注

概述

本文档介绍WordPress块主题系统中的高级功能,帮助开发者超越基础设置和样式,掌握块样式变体、块样式表和块变体等核心特性。

关键要点

  • 块样式变体:允许用户选择自定义块样式变体(即块样式)。
  • 块样式表:注册每个块的独立样式表,以模块化自定义CSS并提升主题加载速度。
  • 块变体:注册基于默认设置的块变体,使用户能通过界面添加。

📄 原文内容

Welcome to the Features documentation. In this chapter, you will learn about various features supported by the WordPress block theming system.

This chapter does not have a singular focus. Instead, it offers information on several different topics that will help you work with more advanced features, stepping beyond the basics that you learned in Global Settings and Styles and Templates.

Navigating this chapter

Use the following links to locate a topic within this chapter. Each article covers a specific feature related to building block themes, and you can explore each at your own pace.

  • Block Style Variations: Build custom block style variations (aka: block styles) for your users to select.
  • Block Stylesheets: Register per-block stylesheets to compartmentalize your custom CSS and make your theme load faster.
  • Block Variations: Register variations on the default settings for a block and let your users add them via the interface.