Changeset 61411 for trunk/src/wp-includes/class-wp-styles.php
- Timestamp:
- 12/26/2025 01:14:22 PM (4 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-styles.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-styles.php
r61397 r61411 107 107 108 108 /** 109 * Holds a string which contains the type attribute for style tag.110 *111 * If the active theme does not declare HTML5 support for 'style',112 * then it initializes as `type='text/css'`.113 *114 * @since 5.3.0115 * @var string116 */117 private $type_attr = '';118 119 /**120 109 * Constructor. 121 110 * … … 123 112 */ 124 113 public function __construct() { 125 if (126 (127 function_exists( 'is_admin' ) &&128 ! is_admin()129 )130 &&131 (132 function_exists( 'current_theme_supports' ) &&133 ! current_theme_supports( 'html5', 'style' )134 )135 ) {136 $this->type_attr = " type='text/css'";137 }138 139 114 /** 140 115 * Fires when the WP_Styles instance is initialized. … … 185 160 if ( $inline_style ) { 186 161 $inline_style_tag = sprintf( 187 "<style id='%s-inline-css' %s>\n%s\n</style>\n",162 "<style id='%s-inline-css'>\n%s\n</style>\n", 188 163 esc_attr( $handle ), 189 $this->type_attr,190 164 $inline_style 191 165 ); … … 233 207 234 208 $tag = sprintf( 235 "<link rel='%s' id='%s-css'%s href='%s' %smedia='%s' />\n",209 "<link rel='%s' id='%s-css'%s href='%s' media='%s' />\n", 236 210 $rel, 237 211 esc_attr( $handle ), 238 212 $title ? sprintf( " title='%s'", esc_attr( $title ) ) : '', 239 213 $href, 240 $this->type_attr,241 214 esc_attr( $media ) 242 215 ); … … 265 238 266 239 $rtl_tag = sprintf( 267 "<link rel='%s' id='%s-rtl-css'%s href='%s' %smedia='%s' />\n",240 "<link rel='%s' id='%s-rtl-css'%s href='%s' media='%s' />\n", 268 241 $rel, 269 242 esc_attr( $handle ), 270 243 $title ? sprintf( " title='%s'", esc_attr( $title ) ) : '', 271 244 $rtl_href, 272 $this->type_attr,273 245 esc_attr( $media ) 274 246 ); … … 366 338 367 339 printf( 368 "<style id='%s-inline-css' %s>\n%s\n</style>\n",340 "<style id='%s-inline-css'>\n%s\n</style>\n", 369 341 esc_attr( $handle ), 370 $this->type_attr,371 342 $output 372 343 );
Note: See TracChangeset
for help on using the changeset viewer.