[WordPress] 外掛分享: WP Rocket ASYNC CSS

首頁外掛目錄 › WP Rocket ASYNC CSS
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
700+
安裝啟用
★★☆☆☆
2.8/5 分(4 則評價)
2202 天前
最後更新
0%
問題解決
WordPress 4.5+ v0.7.1.3 上架:2016-04-19

內容簡介

這個外掛會按照在網頁中找到的順序,將所有內置和外部 CSS 結合起來,並儲存在 WP-Rocket 快取資料夾中作為新文件。處理過程中,具有媒體屬性的文件會被包裹在 @media 選擇器中。異步加載由 https://github.com/filamentgroup/loadCSS 支援。

如果您正在尋找專業團隊來加速您的 WordPress 網站,請查看我們的速度優化、Google 我的商家、SEO 和本地 SEO 服務,網址是 Rank Grow Digital。

過濾器 rocket_async_css_process_style 和 rocket_async_css_process_file 可以用來選擇性地排除任何內置或外部 CSS 的最小化和異步加載。

範例如下:

function exclude_css($skip, $css){
if ( false !== strpos( $css, 'something' ) ) {
return false;
}

return $skip;
}
add_filter('rocket_async_css_process_style','exclude_css', 10, 2);

function exclude_file($skip, $url){
if ( 'some url' == $url ) {
return false;
}

return $skip;
}
add_filter('rocket_async_css_process_style','exclude_file', 10, 2);

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.7.1.3) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「WP Rocket ASYNC CSS」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This plugin will combine all inline and external CSS in the order found on the page and save it to WP-Rocket’s cache folder as a new file. Files with media attributes are wrapped in @media selectors during processing. Async is powered by https://github.com/filamentgroup/loadCSS.
If you are looking for a professional team to get your WordPress site to run faster, check us out for our speed optimization, google my business, seo and local seo services at Rank Grow Digital
Filters rocket_async_css_process_style and rocket_async_css_process_file can be used to selectively exclude any inline CSS or external CSS from minify and async loading.
Examples are:
function exclude_css($skip, $css){
if ( false !== strpos( $css, 'something' ) ) {
return false;
}

return $skip;
}
add_filter('rocket_async_css_process_style','exclude_css', 10, 2);

and
function exclude_file($skip, $url){
if ( 'some url' == $url ) {
return false;
}

return $skip;
}
add_filter('rocket_async_css_process_style','exclude_file', 10, 2);

延伸相關外掛

文章
Filter
Apply Filters
Mastodon