Filter hook 'print_admin_styles'

in WP Core File wp-includes/script-loader.php at line 2327

View Source

print_admin_styles

Filter Hook
Description
Filters whether to print the admin styles.

Hook Information

File Location wp-includes/script-loader.php View on GitHub
Hook Type Filter
Line Number 2327

Hook Parameters

Type Name Description
bool $print Whether to print the admin styles. Default true.

Usage Examples

Basic Usage
<?php
// Hook into print_admin_styles
add_filter('print_admin_styles', 'my_custom_filter', 10, 1);

function my_custom_filter($print) {
    // Your custom filtering logic here
    return $print;
}

Source Code Context

wp-includes/script-loader.php:2327 - How this hook is used in WordPress core
<?php
2322  	 *
2323  	 * @since 2.8.0
2324  	 *
2325  	 * @param bool $print Whether to print the admin styles. Default true.
2326  	 */
2327  	if ( apply_filters( 'print_admin_styles', true ) ) {
2328  		_print_styles();
2329  	}
2330  
2331  	$wp_styles->reset();
2332  	return $wp_styles->done;

PHP Documentation

<?php
/**
	 * Filters whether to print the admin styles.
	 *
	 * @since 2.8.0
	 *
	 * @param bool $print Whether to print the admin styles. Default true.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/script-loader.php
Related Hooks

Related hooks will be displayed here in future updates.