[WordPress] 外掛分享: Load Combined Core Block Assets

首頁外掛目錄 › Load Combined Core Block Assets
1,000+
安裝啟用
★★★★★
5/5 分(6 則評價)
100 天前
最後更新
0%
問題解決
WordPress 6.9+ PHP 7.2+ v1.0.0 上架:2025-12-07

內容簡介

**外掛簡介:**
此外掛為 WordPress 6.9 的臨時解決方案,針對在經典主題中發生任何關於根據需求載入區塊樣式的問題而設計,例如#64354。

**問題與答案:**
- Q: 為什麼需要這個外掛?
- A: 如果您使用經典主題(非區塊主題),需將 should_load_separate_core_block_assets 的過濾設為 false,以回復在 6.9 版本中引入的經典主題預設根據需求載入獨立核心區塊資產的更改。

- Q: 這個外掛應該被視為什麼樣的性質?
- A: 請將此外掛視為臨時解決方案,直到在 6.9.1 版本中解決任何問題為止。您隨時可以透過在前端 URL 中添加 `?should_load_separate_core_block_assets=true` 來測試是否還有任何問題;這會還原 WP 6.9 的預設行為。

- Q: 為什麼這個解決方案被視為臨時的?
- A: 之所以這個解決方案是臨時的是因為載入獨立核心區塊資產有性能優勢。它們只會在需要時按需載入,而不是載入龐大的單一組合 wp-block-library 樣式表。根據需求載入獨立區塊樣式可以減少 CSS 的量,進而提升頁面加載速度。

```html
<ul>
<li>為什麼需要這個外掛?</li>
<li>這個外掛應該被視為什麼樣的性質?</li>
<li>為什麼這個解決方案被視為臨時的?</li>
</ul>
```

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Load Combined Core Block Assets」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This is a temporary workaround for sites experiencing any issues with WordPress 6.9’s new ability to load block styles on demand in classic themes, for example #64354.
If running a classic theme (i.e. not a block theme), it filters should_load_separate_core_block_assets to be false. This has the effect of reverting a change introduced in 6.9 where classic themes now load separate core block assets on demand by default.
Note that this plugin should be considered temporary until any issues are resolved in 6.9.1. At any time, you can test whether any issues remain by adding ?should_load_separate_core_block_assets=true to any frontend URL; this restores the default behavior in WP 6.9.
This workaround is temporary because there are performance benefits to loading separate core block assets. They can be loaded on demand just when they are used, as opposed to loading the large single combined wp-block-library stylesheet. Loading separate block styles on demand reduces the amount of CSS which should improve page load time.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon