From d4688047b9d7682fef0ef47c1fe3c4dff5f5c006 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Thu, 13 Jun 2024 13:03:15 +0000 Subject: [PATCH 1/4] Comments: Expire comment author cookies after 1 year (rather than 0.95129375951 of a year) This filter was originally added in [19622] which predates the addition of the constant added in [21996] by 24085717 seconds. Props peterwilsoncc, khokansardar, krupalpanchal. Fixes #61412. git-svn-id: https://develop.svn.wordpress.org/trunk@58401 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/comment.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index cca3901207775..748dd6161b222 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -557,10 +557,11 @@ function wp_set_comment_cookies( $comment, $user, $cookies_consent = true ) { * Filters the lifetime of the comment cookie in seconds. * * @since 2.8.0 + * @since 6.6.0 The default $seconds value changed from 30000000 to YEAR_IN_SECONDS. * - * @param int $seconds Comment cookie lifetime. Default 30000000. + * @param int $seconds Comment cookie lifetime. Default YEAR_IN_SECONDS. */ - $comment_cookie_lifetime = time() + apply_filters( 'comment_cookie_lifetime', 30000000 ); + $comment_cookie_lifetime = time() + apply_filters( 'comment_cookie_lifetime', YEAR_IN_SECONDS ); $secure = ( 'https' === parse_url( home_url(), PHP_URL_SCHEME ) ); From 63cafcf35c56e7a8f81993a3f5eb29eafa3a2758 Mon Sep 17 00:00:00 2001 From: Tonya Mork Date: Thu, 13 Jun 2024 13:25:41 +0000 Subject: [PATCH 2/4] Plugins: Remove unassigned sprintf in wp_get_plugin_action_button(). Removes an unassigned `sprintf` that was accidentally included as part of [57545] in the `wp_get_plugin_action_button()`. A copy/paste whoopsie. The actual used code is assigned a wee bit lower in the function within the `install` case. Follow-up to [57545]. Props hellofromTonya, costdev, rajinsharwar. Fixes #61420. git-svn-id: https://develop.svn.wordpress.org/trunk@58402 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/plugin-install.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/wp-admin/includes/plugin-install.php b/src/wp-admin/includes/plugin-install.php index 54f334d4680a8..a56533fbd156a 100644 --- a/src/wp-admin/includes/plugin-install.php +++ b/src/wp-admin/includes/plugin-install.php @@ -942,16 +942,6 @@ function wp_get_plugin_action_button( $name, $data, $compatible_php, $compatible $all_plugin_dependencies_installed = $installed_plugin_dependencies_count === $plugin_dependencies_count; $all_plugin_dependencies_active = $active_plugin_dependencies_count === $plugin_dependencies_count; - sprintf( - '%s', - esc_attr( $data->slug ), - esc_url( $status['url'] ), - /* translators: %s: Plugin name and version. */ - esc_attr( sprintf( _x( 'Install %s now', 'plugin' ), $name ) ), - esc_attr( $name ), - _x( 'Install Now', 'plugin' ) - ); - if ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) { switch ( $status['status'] ) { case 'install': From aedad15f57f4998fc893ed19ccff751d3e1a3b17 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Thu, 13 Jun 2024 13:43:59 +0000 Subject: [PATCH 3/4] Bundled block themes: Set `theme.json` schema version to `6.5`. This changeset updates the `theme.json` schema version from `trunk` which is the development version to the last schema for version 2 available at `https://schemas.wp.org/wp/6.5/theme.json`. Props poena, sabernhardt, wildworks, mukesh27, kafleg. Fixes #61342. git-svn-id: https://develop.svn.wordpress.org/trunk@58403 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentytwentyfour/theme.json | 2 +- src/wp-content/themes/twentytwentythree/theme.json | 2 +- src/wp-content/themes/twentytwentytwo/theme.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-content/themes/twentytwentyfour/theme.json b/src/wp-content/themes/twentytwentyfour/theme.json index fe6bd3b606c20..134da2894ea44 100644 --- a/src/wp-content/themes/twentytwentyfour/theme.json +++ b/src/wp-content/themes/twentytwentyfour/theme.json @@ -1,5 +1,5 @@ { - "$schema": "https://schemas.wp.org/trunk/theme.json", + "$schema": "https://schemas.wp.org/wp/6.5/theme.json", "version": 2, "patterns": [ "three-columns-of-services", diff --git a/src/wp-content/themes/twentytwentythree/theme.json b/src/wp-content/themes/twentytwentythree/theme.json index 32eb7edf9b59d..4ac5ac8920c61 100644 --- a/src/wp-content/themes/twentytwentythree/theme.json +++ b/src/wp-content/themes/twentytwentythree/theme.json @@ -1,5 +1,5 @@ { - "$schema": "https://schemas.wp.org/trunk/theme.json", + "$schema": "https://schemas.wp.org/wp/6.5/theme.json", "version": 2, "customTemplates": [ { diff --git a/src/wp-content/themes/twentytwentytwo/theme.json b/src/wp-content/themes/twentytwentytwo/theme.json index ec9ff8644e4af..da4e623a002c8 100644 --- a/src/wp-content/themes/twentytwentytwo/theme.json +++ b/src/wp-content/themes/twentytwentytwo/theme.json @@ -1,5 +1,5 @@ { - "$schema": "https://schemas.wp.org/trunk/theme.json", + "$schema": "https://schemas.wp.org/wp/6.5/theme.json", "version": 2, "customTemplates": [ { From dbb326167a89681ca6ac4341897ca36ff12532ea Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Thu, 13 Jun 2024 13:55:46 +0000 Subject: [PATCH 4/4] Administration: A11y: Add visible labels in theme UI. Finish task to replace placeholders used for labels with visible label elements. Add label elements in theme browser and theme installation screen. Change position of search input to match other user interfaces in WordPress. Also crediting all contributors to ticket #61389, which this also closes. Props joedolson, rcreators, sabernhardt, balub, rejaulalomkhan, syamraj24, nazmul111, krupajnanda, huzaifaalmesbah, hmbashar, mdnesarmridha, colorful-tones, printsachen1. Fixes #40331, #61389. git-svn-id: https://develop.svn.wordpress.org/trunk@58405 602fd350-edb4-49c9-b593-d223f7449a82 --- src/js/_enqueues/wp/theme.js | 5 ++--- src/wp-admin/css/themes.css | 27 +++++++++++++++++++-------- src/wp-admin/network/site-themes.php | 2 +- src/wp-admin/network/themes.php | 2 +- src/wp-admin/theme-install.php | 3 +-- src/wp-admin/themes.php | 9 +++------ 6 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/js/_enqueues/wp/theme.js b/src/js/_enqueues/wp/theme.js index e4bebbbc1e8c1..65b5b4cf1c63d 100644 --- a/src/js/_enqueues/wp/theme.js +++ b/src/js/_enqueues/wp/theme.js @@ -96,7 +96,7 @@ themes.view.Appearance = wp.Backbone.View.extend({ }, // Defines search element container. - searchContainer: $( '.search-form' ), + searchContainer: $( '.search-form .search-box' ), // Search input and view // for current theme collection. @@ -118,7 +118,7 @@ themes.view.Appearance = wp.Backbone.View.extend({ // Render and append after screen title. view.render(); this.searchContainer - .append( $.parseHTML( '' ) ) + .append( $.parseHTML( '' ) ) .append( view.el ) .on( 'submit', function( event ) { event.preventDefault(); @@ -1359,7 +1359,6 @@ themes.view.Search = wp.Backbone.View.extend({ searching: false, attributes: { - placeholder: l10n.searchPlaceholder, type: 'search', 'aria-describedby': 'live-search-desc' }, diff --git a/src/wp-admin/css/themes.css b/src/wp-admin/css/themes.css index a68abbca04f94..e7c58b257fc76 100644 --- a/src/wp-admin/css/themes.css +++ b/src/wp-admin/css/themes.css @@ -19,23 +19,23 @@ body.js .theme-browser.search-loading { clear: both; } -.themes-php:not(.network-admin) .wrap h1 { - margin-bottom: 15px; -} - .themes-php .wrap h1 .button { margin-left: 20px; } /* Search form */ .themes-php .search-form { - display: inline; + display: inline-flex; + align-items: center; + position: relative; + top: 0; + gap: .5rem; + width: 100%; + justify-content: end; } .themes-php .wp-filter-search { position: relative; - top: -2px; - left: 20px; margin: 0; width: 280px; } @@ -955,11 +955,15 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { clear: both; left: 0; right: 0; - margin: -5px 0 20px; width: 100%; max-width: 280px; } + .theme-install-php .wp-filter p.search-box { + display: grid; + row-gap: .5rem; + } + .theme-browser .theme.add-new-theme span:after { font: normal 60px/90px dashicons; width: 80px; @@ -1029,6 +1033,13 @@ body.folded .theme-browser ~ .theme-overlay .theme-wrap { padding-left: 20px; } +/* Override column gap adjustment in media library. */ +@media only screen and (max-width: 1000px) { + .theme-install-php .wp-filter p.search-box { + column-gap: .5rem; + } +} + .theme-install-php a.upload, .theme-install-php a.browse-themes { cursor: pointer; diff --git a/src/wp-admin/network/site-themes.php b/src/wp-admin/network/site-themes.php index 79fe4d5f0576b..8d76efc259333 100644 --- a/src/wp-admin/network/site-themes.php +++ b/src/wp-admin/network/site-themes.php @@ -237,7 +237,7 @@

-search_box( __( 'Search Installed Themes' ), 'theme' ); ?> +search_box( __( 'Search installed themes' ), 'theme' ); ?>
diff --git a/src/wp-admin/network/themes.php b/src/wp-admin/network/themes.php index 4c6febea9805f..7252fa744fc78 100644 --- a/src/wp-admin/network/themes.php +++ b/src/wp-admin/network/themes.php @@ -460,7 +460,7 @@ ?>
-search_box( __( 'Search Installed Themes' ), 'theme' ); ?> +search_box( __( 'Search installed themes' ), 'theme' ); ?>
array( 'addNew' => __( 'Add New Theme' ), 'search' => __( 'Search Themes' ), - 'searchPlaceholder' => __( 'Search themes...' ), // Placeholder (no ellipsis). 'upload' => __( 'Upload Theme' ), 'back' => __( 'Back' ), 'error' => sprintf( @@ -217,7 +216,7 @@ -
+
array( 'addNew' => __( 'Add New Theme' ), - 'search' => __( 'Search Installed Themes' ), - 'searchPlaceholder' => __( 'Search installed themes...' ), // Placeholder (no ellipsis). + 'search' => __( 'Search installed themes' ), /* translators: %d: Number of themes. */ 'themesFound' => __( 'Number of Themes found: %d' ), 'noThemesFound' => __( 'No themes found. Try a different search.' ), @@ -252,14 +251,12 @@

- - -
-
+
+