File tree Expand file tree Collapse file tree 1 file changed +10
-18
lines changed
Expand file tree Collapse file tree 1 file changed +10
-18
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments