內容簡介
這個外掛會按照在網頁中找到的順序,將所有內置和外部 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);
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
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);
