wp_get_custom_css
Filter HookDescription
Filters the custom CSS output into the head element.Hook Information
File Location |
wp-includes/theme.php
View on GitHub
|
Hook Type | Filter |
Line Number | 2050 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$css
|
CSS pulled in from the Custom CSS post type. |
string
|
$stylesheet
|
The theme stylesheet name. |
Usage Examples
Basic Usage
<?php
// Hook into wp_get_custom_css
add_filter('wp_get_custom_css', 'my_custom_filter', 10, 2);
function my_custom_filter($css, $stylesheet) {
// Your custom filtering logic here
return $css;
}
Source Code Context
wp-includes/theme.php:2050
- How this hook is used in WordPress core
<?php
2045 * @since 4.7.0
2046 *
2047 * @param string $css CSS pulled in from the Custom CSS post type.
2048 * @param string $stylesheet The theme stylesheet name.
2049 */
2050 $css = apply_filters( 'wp_get_custom_css', $css, $stylesheet );
2051
2052 return $css;
2053 }
2054
2055 /**
PHP Documentation
<?php
/**
* Filters the custom CSS output into the head element.
*
* @since 4.7.0
*
* @param string $css CSS pulled in from the Custom CSS post type.
* @param string $stylesheet The theme stylesheet name.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/theme.php
Related Hooks
Related hooks will be displayed here in future updates.