Skip to content

Commit 35c6e12

Browse files
committed
Merge branch 'trunk' into styles/use-html-api-for-style-tags
2 parents aad4744 + d96ff0b commit 35c6e12

43 files changed

Lines changed: 1289 additions & 493 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/wp-activate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function do_activate_header() {
100100
*/
101101
function wpmu_activate_stylesheet() {
102102
?>
103-
<style type="text/css">
103+
<style>
104104
.wp-activate-container { width: 90%; margin: 0 auto; }
105105
.wp-activate-container form { margin-top: 2em; }
106106
#submit, #key { width: 100%; font-size: 24px; box-sizing: border-box; }

src/wp-admin/includes/ajax-actions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3946,7 +3946,7 @@ function wp_ajax_parse_media_shortcode() {
39463946
$styles = wpview_media_sandbox_styles();
39473947

39483948
foreach ( $styles as $style ) {
3949-
$head .= '<link type="text/css" rel="stylesheet" href="' . $style . '">';
3949+
$head .= '<link rel="stylesheet" href="' . $style . '">';
39503950
}
39513951

39523952
if ( ! empty( $wp_scripts ) ) {

src/wp-admin/includes/class-wp-upgrader.php

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -292,30 +292,32 @@ public function fs_connect( $directories = array(), $allow_relaxed_file_ownershi
292292
}
293293

294294
/**
295-
* Downloads a package.
295+
* Downloads a package for a WordPress core, plugin, theme, or translation upgrade.
296296
*
297297
* @since 2.8.0
298298
* @since 5.2.0 Added the `$check_signatures` parameter.
299299
* @since 5.5.0 Added the `$hook_extra` parameter.
300300
*
301-
* @param string $package The URI of the package. If this is the full path to an
302-
* existing local file, it will be returned untouched.
301+
* @param string $package The URI of the package. May be a remote URL or local file path. If this is the full
302+
* path to an existing local file, it will be returned untouched.
303303
* @param bool $check_signatures Whether to validate file signatures. Default false.
304304
* @param array $hook_extra Extra arguments to pass to the filter hooks. Default empty array.
305305
* @return string|WP_Error The full path to the downloaded package file, or a WP_Error object.
306306
*/
307307
public function download_package( $package, $check_signatures = false, $hook_extra = array() ) {
308308
/**
309-
* Filters whether to return the package.
309+
* Filters whether to download a package for a WordPress core, plugin, theme, or translation upgrade.
310+
*
311+
* Return a non-false value to short-circuit the download and return that value instead.
310312
*
311313
* @since 3.7.0
312314
* @since 5.5.0 Added the `$hook_extra` parameter.
313315
*
314-
* @param bool $reply Whether to bail without returning the package.
315-
* Default false.
316-
* @param string $package The package file name.
317-
* @param WP_Upgrader $upgrader The WP_Upgrader instance.
318-
* @param array $hook_extra Extra arguments passed to hooked filters.
316+
* @param false|string|WP_Error $reply Whether to short-circuit the download, the path to the downloaded package,
317+
* or a WP_Error object. Default false.
318+
* @param string $package The package URI. May be a remote URL or local file path.
319+
* @param WP_Upgrader $upgrader The WP_Upgrader instance.
320+
* @param array $hook_extra Extra arguments passed to hooked filters.
319321
*/
320322
$reply = apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra );
321323
if ( false !== $reply ) {
@@ -519,7 +521,6 @@ public function install_package( $args = array() ) {
519521

520522
$args = wp_parse_args( $args, $defaults );
521523

522-
// These were previously extract()'d.
523524
$source = $args['source'];
524525
$destination = $args['destination'];
525526
$clear_destination = $args['clear_destination'];
@@ -592,10 +593,10 @@ public function install_package( $args = array() ) {
592593
* @since 2.8.0
593594
* @since 4.4.0 The `$hook_extra` parameter became available.
594595
*
595-
* @param string $source File source location.
596-
* @param string $remote_source Remote file source location.
597-
* @param WP_Upgrader $upgrader WP_Upgrader instance.
598-
* @param array $hook_extra Extra arguments passed to hooked filters.
596+
* @param string|WP_Error $source File source location or a WP_Error object.
597+
* @param string $remote_source Remote file source location.
598+
* @param WP_Upgrader $upgrader WP_Upgrader instance.
599+
* @param array $hook_extra Extra arguments passed to hooked filters.
599600
*/
600601
$source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this, $args['hook_extra'] );
601602

src/wp-admin/includes/export.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,12 @@ function export_wp( $args = array() ) {
239239
*
240240
* @since 2.1.0
241241
*
242-
* @param string $str String to wrap in XML CDATA tag.
242+
* @param string|null $str String to wrap in XML CDATA tag. May be null.
243243
* @return string
244244
*/
245245
function wxr_cdata( $str ) {
246+
$str = (string) $str;
247+
246248
if ( ! wp_is_valid_utf8( $str ) ) {
247249
$str = utf8_encode( $str );
248250
}

src/wp-admin/includes/plugin-install.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ function install_plugin_information() {
606606
$low = empty( $api->banners['low'] ) ? $api->banners['high'] : $api->banners['low'];
607607
$high = empty( $api->banners['high'] ) ? $api->banners['low'] : $api->banners['high'];
608608
?>
609-
<style type="text/css">
609+
<style>
610610
#plugin-information-title.with-banner {
611611
background-image: url( <?php echo esc_url( $low ); ?> );
612612
}

src/wp-admin/includes/privacy-tools.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ function wp_privacy_generate_personal_data_export_file( $request_id ) {
451451
fwrite( $file, "<html>\n" );
452452
fwrite( $file, "<head>\n" );
453453
fwrite( $file, "<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />\n" );
454-
fwrite( $file, "<style type='text/css'>" );
454+
fwrite( $file, '<style>' );
455455
fwrite( $file, 'body { color: black; font-family: Arial, sans-serif; font-size: 11pt; margin: 15px auto; width: 860px; }' );
456456
fwrite( $file, 'table { background: #f0f0f0; border: 1px solid #ddd; margin-bottom: 20px; width: 100%; }' );
457457
fwrite( $file, 'th { padding: 5px; text-align: left; width: 20%; }' );

src/wp-admin/update-core.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -526,19 +526,19 @@ function list_plugin_updates() {
526526
// Get plugin compat for running version of WordPress.
527527
if ( isset( $plugin_data->update->tested ) && version_compare( $plugin_data->update->tested, $cur_wp_version, '>=' ) ) {
528528
/* translators: %s: WordPress version. */
529-
$compat = '<br />' . sprintf( __( 'Compatibility with WordPress %s: 100%% (according to its author)' ), $cur_wp_version );
529+
$compat = '<br />' . sprintf( __( 'Compatibility with WordPress %s: Yes (according to its author)' ), $cur_wp_version );
530530
} else {
531531
/* translators: %s: WordPress version. */
532-
$compat = '<br />' . sprintf( __( 'Compatibility with WordPress %s: Unknown' ), $cur_wp_version );
532+
$compat = '<br />' . sprintf( __( 'Compatibility with WordPress %s: Not tested' ), $cur_wp_version );
533533
}
534534
// Get plugin compat for updated version of WordPress.
535535
if ( $core_update_version ) {
536536
if ( isset( $plugin_data->update->tested ) && version_compare( $plugin_data->update->tested, $core_update_version, '>=' ) ) {
537537
/* translators: %s: WordPress version. */
538-
$compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %s: 100%% (according to its author)' ), $core_update_version );
538+
$compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %s: Yes (according to its author)' ), $core_update_version );
539539
} else {
540540
/* translators: %s: WordPress version. */
541-
$compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %s: Unknown' ), $core_update_version );
541+
$compat .= '<br />' . sprintf( __( 'Compatibility with WordPress %s: Not tested' ), $core_update_version );
542542
}
543543
}
544544

@@ -987,7 +987,7 @@ function do_undismiss_core_update() {
987987
$title = __( 'WordPress Updates' );
988988
$parent_file = 'index.php';
989989

990-
$updates_overview = '<p>' . __( 'On this screen, you can update to the latest version of WordPress, as well as update your themes, plugins, and translations from the WordPress.org repositories.' ) . '</p>';
990+
$updates_overview = '<p>' . __( 'On this screen, you can update to the latest version of WordPress, as well as update your themes, plugins, and translations.' ) . '</p>';
991991
$updates_overview .= '<p>' . __( 'If an update is available, you&#8127;ll see a notification appear in the Toolbar and navigation menu.' ) . ' ' . __( 'Keeping your site updated is important for security. It also makes the internet a safer place for you and your readers.' ) . '</p>';
992992

993993
get_current_screen()->add_help_tab(

src/wp-content/themes/twentyeleven/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ function twentyeleven_header_style() {
335335

336336
// If we get this far, we have custom styles. Let's do this.
337337
?>
338-
<style type="text/css" id="twentyeleven-header-css">
338+
<style id="twentyeleven-header-css">
339339
<?php
340340
// Has the text been hidden?
341341
if ( 'blank' === $text_color ) :

src/wp-content/themes/twentyeleven/header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
?>
3939
</title>
4040
<link rel="profile" href="https://gmpg.org/xfn/11" />
41-
<link rel="stylesheet" type="text/css" media="all" href="<?php echo esc_url( get_stylesheet_uri() ); ?>?ver=20251202" />
41+
<link rel="stylesheet" media="all" href="<?php echo esc_url( get_stylesheet_uri() ); ?>?ver=20251202" />
4242
<link rel="pingback" href="<?php echo esc_url( get_bloginfo( 'pingback_url' ) ); ?>">
4343
<?php
4444
/*

src/wp-content/themes/twentyfifteen/inc/custom-header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function twentyfifteen_header_style() {
9595

9696
// If we get this far, we have custom styles. Let's do this.
9797
?>
98-
<style type="text/css" id="twentyfifteen-header-css">
98+
<style id="twentyfifteen-header-css">
9999
<?php
100100
// Short header for when there is no Custom Header and Header Text is hidden.
101101
if ( empty( $header_image ) && ! display_header_text() ) :

0 commit comments

Comments
 (0)