wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
_custom_logo_header_styles is private and should not be used in themes or plugins directly.
_custom_logo_header_styles › WordPress Function
Seit4.5.0
Veraltetn/v
› _custom_logo_header_styles ( Keine Parameter )
Zugriff: |
|
Definiert in: |
|
Codex: |
Adds CSS to hide header text for custom logo, based on Customizer setting.
Ähnliche Funktionen: has_custom_header, _wp_customize_loader_settings, get_custom_header, add_custom_image_header, remove_custom_image_header
Quellcode
function _custom_logo_header_styles() { if ( ! current_theme_supports( 'custom-header', 'header-text' ) && get_theme_support( 'custom-logo', 'header-text' ) && ! get_theme_mod( 'header_text', true ) ) { $classes = (array) get_theme_support( 'custom-logo', 'header-text' ); $classes = array_map( 'sanitize_html_class', $classes ); $classes = '.' . implode( ', .', $classes ); $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; ?> <!-- Custom Logo: hide header text --> <style id="custom-logo-css"<?php echo $type_attr; ?>> <?php echo $classes; ?> { position: absolute; clip: rect(1px, 1px, 1px, 1px); } </style> <?php } }