styles_inline_size_limit
Filter HookDescription
The maximum size of inlined styles in bytes.Hook Information
File Location |
wp-includes/script-loader.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3041 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$total_inline_limit
|
The file-size threshold, in bytes. Default 20000. |
Usage Examples
Basic Usage
<?php
// Hook into styles_inline_size_limit
add_filter('styles_inline_size_limit', 'my_custom_filter', 10, 1);
function my_custom_filter($total_inline_limit) {
// Your custom filtering logic here
return $total_inline_limit;
}
Source Code Context
wp-includes/script-loader.php:3041
- How this hook is used in WordPress core
<?php
3036 *
3037 * @since 5.8.0
3038 *
3039 * @param int $total_inline_limit The file-size threshold, in bytes. Default 20000.
3040 */
3041 $total_inline_limit = apply_filters( 'styles_inline_size_limit', $total_inline_limit );
3042
3043 $styles = array();
3044
3045 // Build an array of styles that have a path defined.
3046 foreach ( $wp_styles->queue as $handle ) {
PHP Documentation
<?php
/**
* The maximum size of inlined styles in bytes.
*
* @since 5.8.0
*
* @param int $total_inline_limit The file-size threshold, in bytes. Default 20000.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/script-loader.php
Related Hooks
Related hooks will be displayed here in future updates.