Skip to content

Commit aad4744

Browse files
committed
Revert "Use HTML API for hide header text"
This reverts commit 6c6a72b.
1 parent 6c6a72b commit aad4744

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

src/wp-includes/theme.php

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3010,24 +3010,16 @@ function _custom_logo_header_styles() {
30103010
$classes = array_map( 'sanitize_html_class', $classes );
30113011
$classes = '.' . implode( ', .', $classes );
30123012

3013-
$css = <<<"CSS"
3014-
3015-
{$classes} {
3016-
position: absolute;
3017-
clip-path: inset(50%);
3018-
}
3019-
3020-
CSS;
3021-
3022-
$processor = new WP_HTML_Tag_Processor(
3023-
"<!-- Custom Logo: hide header text -->\n<style id='custom-logo-css'></style>"
3024-
);
3025-
$processor->next_tag();
3026-
if ( ! current_theme_supports( 'html5', 'style' ) ) {
3027-
$processor->set_attribute( 'type', 'text/css' );
3028-
}
3029-
$processor->set_modifiable_text( $css );
3030-
echo $processor->get_updated_html();
3013+
$type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
3014+
?>
3015+
<!-- Custom Logo: hide header text -->
3016+
<style id="custom-logo-css"<?php echo $type_attr; ?>>
3017+
<?php echo $classes; ?> {
3018+
position: absolute;
3019+
clip-path: inset(50%);
3020+
}
3021+
</style>
3022+
<?php
30313023
}
30323024
}
30333025

0 commit comments

Comments
 (0)