mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01: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. Built from https://develop.svn.wordpress.org/trunk@54348 git-svn-id: http://core.svn.wordpress.org/trunk@53907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
525c52c873
commit
f8bd8914da
@ -224,10 +224,10 @@ class WP_Styles extends WP_Dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$rel = isset( $obj->extra['alt'] ) && $obj->extra['alt'] ? 'alternate stylesheet' : 'stylesheet';
|
$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(
|
$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,
|
$rel,
|
||||||
$handle,
|
$handle,
|
||||||
$title,
|
$title,
|
||||||
@ -259,7 +259,7 @@ class WP_Styles extends WP_Dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$rtl_tag = sprintf(
|
$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,
|
$rel,
|
||||||
$handle,
|
$handle,
|
||||||
$title,
|
$title,
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.1-beta2-54347';
|
$wp_version = '6.1-beta2-54348';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user