
內容簡介
CSS Class Manager 是一款進階的 WordPress 外掛,旨在簡化在區塊中添加多個 CSS 類別的過程。透過自動補全建議和專用的類別管理器,使用者可以更有效率地進行區塊樣式設計。
【主要功能】
• 進階自動補全控制:簡化 CSS 類別的添加過程
• 輕鬆的類別管理:直接在管理介面中添加、編輯或移除類別
• 主體與文章類別:可在文章編輯器中直接添加自定義類別
• 行內 CSS 類別:可為段落、標題等支援豐富文本的區塊添加類別
• theme.json 整合:自動包含來自 theme.json 設定的全域類別名稱
• 匯入與匯出:輕鬆轉移自定義 CSS 類別名稱
外掛標籤
開發者團隊
② 後台搜尋「CSS Class Manager – An advanced autocomplete additional css class control for your blocks」→ 直接安裝(推薦)
原文外掛簡介
Struggling with adding multiple CSS classes to your WordPress blocks? CSS Class Manager simplifies the process with autocomplete suggestions and a dedicated manager for adding, editing, and organizing your classes. Boost your block styling efficiency!
There are two main motivations behind creating this plugin:
Limitation of Block Style – When applying a block style, only one CSS class can be added to a block. Unfortunately, the block editor lacks the ability to select multiple block styles. To address this, users must resort to the Additional CSS Class(es) inspector control to apply multiple classes. CSS Class Manager provides a powerful manager and an autocomplete inspector control, enabling users to easily add and apply CSS classes to their blocks.
Poor UX of the Additional CSS Class(es) control – The default control for adding class names is a simple text input. This can be cumbersome, especially when applying CSS classes frequently. With the custom inspector control provided by CSS Class Manager, users can effortlessly add their class names, enhancing the user experience.
Features
Advanced Autocomplete Control: Streamline block styling with autocomplete functionality for CSS classes.
Effortless Class Management: Easily add, edit, or remove CSS classes directly within the manager interface.
Body and Post Classes: Add custom class names to post body and post containers using body_class and post_class filters directly from the post editor.
Inline CSS Classes: Add custom class names to any selected text inside paragraph, heading and other blocks that support Rich Text.
Theme.json Integration: Automatically include global class names generated from theme.json settings in your class suggestions.
Show the control in its own panel: User specific settings to show the Additional CSS Class(es) control in its own panel.
Add classes without saving to the database: User specific settings to toggle saving classes to the database.
Import and Export: Seamlessly transfer custom CSS class names to ensure consistency across projects.
Getting Started
Activate the plugin within your WordPress setup.
The advanced control will replace the default “Additional CSS Class(es)” and can be found in the “Advance” block settings section.
Adding and selecting classes in the autocomplete field is similar to the tags and categories fields.
To add body or post classes, look for the “Body Classes” and “Post Classes” controls in the Post tab of the post editor (requires custom-fields support). See the limitations
To add inline classes to the selected text, use the block format tool control in the text formatting tools options (available in blocks that support Rich Text).
To edit and manage class names, click the “Open Class Manager” link or select “CSS Class Manager” from the More Menu.
Import/Export can be done from the manager modal.
Theme.json generated classes are automatically included and can be disabled from the Preferences in the manager modal.
Use css_class_manager_filtered_class_names filter to add class names with PHP files.
