styles_inline_size_limit
The maximum size of inlined styles in bytes.
Usage
add_filter( 'styles_inline_size_limit', 'wp_kama_styles_inline_size_limit_filter' );
/**
* Function for `styles_inline_size_limit` filter-hook.
*
* @param int $total_inline_limit The file-size threshold, in bytes.
*
* @return int
*/
function wp_kama_styles_inline_size_limit_filter( $total_inline_limit ){
// filter...
return $total_inline_limit;
}
- $total_inline_limit(int)
- The file-size threshold, in bytes.
Default: 40000
Changelog
| Since 5.8.0 | Introduced. |
| Since 6.9.0 | The default limit increased from 20K to 40K. |
Where the hook is called
styles_inline_size_limit
wp-includes/script-loader.php 3071
$total_inline_limit = apply_filters( 'styles_inline_size_limit', $total_inline_limit );