mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Script Loader: Prevent double space between attributes in WP_Styles class.
This changeset prevents `<link />` elements to display a double space between attributes when no `title` attribute is provided. Props elten, audrasjb, whaze, SergeyBiryukov. Fixes #56675. git-svn-id: https://develop.svn.wordpress.org/trunk@54348 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -224,10 +224,10 @@ class WP_Styles extends WP_Dependencies {
|
||||
}
|
||||
|
||||
$rel = isset( $obj->extra['alt'] ) && $obj->extra['alt'] ? 'alternate stylesheet' : 'stylesheet';
|
||||
$title = isset( $obj->extra['title'] ) ? sprintf( "title='%s'", esc_attr( $obj->extra['title'] ) ) : '';
|
||||
$title = isset( $obj->extra['title'] ) ? sprintf( " title='%s'", esc_attr( $obj->extra['title'] ) ) : '';
|
||||
|
||||
$tag = sprintf(
|
||||
"<link rel='%s' id='%s-css' %s href='%s'%s media='%s' />\n",
|
||||
"<link rel='%s' id='%s-css'%s href='%s'%s media='%s' />\n",
|
||||
$rel,
|
||||
$handle,
|
||||
$title,
|
||||
@@ -259,7 +259,7 @@ class WP_Styles extends WP_Dependencies {
|
||||
}
|
||||
|
||||
$rtl_tag = sprintf(
|
||||
"<link rel='%s' id='%s-rtl-css' %s href='%s'%s media='%s' />\n",
|
||||
"<link rel='%s' id='%s-rtl-css'%s href='%s'%s media='%s' />\n",
|
||||
$rel,
|
||||
$handle,
|
||||
$title,
|
||||
|
||||
Reference in New Issue
Block a user