wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes
wp_enqueue_admin_bar_header_styles › WordPress Function
Depuis6.4.0
Dépréciéen/a
› wp_enqueue_admin_bar_header_styles ( Pas de paramètres )
| Défini(e) dans: |
|
| Codex: |
Enqueues inline style to hide the admin bar when printing.
Source
function wp_enqueue_admin_bar_header_styles() {
// Back-compat for plugins that disable functionality by unhooking this action.
$action = is_admin() ? 'admin_head' : 'wp_head';
if ( ! has_action( $action, 'wp_admin_bar_header' ) ) {
return;
}
remove_action( $action, 'wp_admin_bar_header' );
wp_add_inline_style( 'admin-bar', '@media print { #wpadminbar { display:none; } }' );
}