Skip to content

Commit

Permalink
Merge branch 'WordPress:trunk' into trac-ticket-53843
Browse files Browse the repository at this point in the history
  • Loading branch information
DorZuberi authored Jun 13, 2024
2 parents e987469 + dbb3261 commit 4f935cd
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 36 deletions.
5 changes: 2 additions & 3 deletions src/js/_enqueues/wp/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -118,7 +118,7 @@ themes.view.Appearance = wp.Backbone.View.extend({
// Render and append after screen title.
view.render();
this.searchContainer
.append( $.parseHTML( '<label class="screen-reader-text" for="wp-filter-search-input">' + l10n.search + '</label>' ) )
.append( $.parseHTML( '<label for="wp-filter-search-input">' + l10n.search + '</label>' ) )
.append( view.el )
.on( 'submit', function( event ) {
event.preventDefault();
Expand Down Expand Up @@ -1359,7 +1359,6 @@ themes.view.Search = wp.Backbone.View.extend({
searching: false,

attributes: {
placeholder: l10n.searchPlaceholder,
type: 'search',
'aria-describedby': 'live-search-desc'
},
Expand Down
27 changes: 19 additions & 8 deletions src/wp-admin/css/themes.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 0 additions & 10 deletions src/wp-admin/includes/plugin-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
'<a class="install-now button" data-slug="%s" href="%s" aria-label="%s" data-name="%s" role="button">%s</a>',
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':
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/network/site-themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
<p><?php _e( 'Network enabled themes are not shown on this screen.' ); ?></p>

<form method="get">
<?php $wp_list_table->search_box( __( 'Search Installed Themes' ), 'theme' ); ?>
<?php $wp_list_table->search_box( __( 'Search installed themes' ), 'theme' ); ?>
<input type="hidden" name="id" value="<?php echo esc_attr( $id ); ?>" />
</form>

Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/network/themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@
?>

<form method="get">
<?php $wp_list_table->search_box( __( 'Search Installed Themes' ), 'theme' ); ?>
<?php $wp_list_table->search_box( __( 'Search installed themes' ), 'theme' ); ?>
</form>

<?php
Expand Down
3 changes: 1 addition & 2 deletions src/wp-admin/theme-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
'l10n' => array(
'addNew' => __( 'Add New Theme' ),
'search' => __( 'Search Themes' ),
'searchPlaceholder' => __( 'Search themes...' ), // Placeholder (no ellipsis).
'upload' => __( 'Upload Theme' ),
'back' => __( 'Back' ),
'error' => sprintf(
Expand Down Expand Up @@ -217,7 +216,7 @@

<button type="button" class="button drawer-toggle" aria-expanded="false"><?php _e( 'Feature Filter' ); ?></button>

<form class="search-form"></form>
<form class="search-form"><p class="search-box"></p></form>

<div class="favorites-form">
<?php
Expand Down
9 changes: 3 additions & 6 deletions src/wp-admin/themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@
),
'l10n' => 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.' ),
Expand All @@ -252,14 +251,12 @@
<h1 class="wp-heading-inline"><?php esc_html_e( 'Themes' ); ?>
<span class="title-count theme-count"><?php echo ! empty( $_GET['search'] ) ? __( '&hellip;' ) : count( $themes ); ?></span>
</h1>

<?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
<a href="<?php echo esc_url( admin_url( 'theme-install.php' ) ); ?>" class="hide-if-no-js page-title-action"><?php echo esc_html__( 'Add New Theme' ); ?></a>
<?php endif; ?>

<form class="search-form"></form>

<hr class="wp-header-end">
<form class="search-form search-themes"><p class="search-box"></p></form>

<?php
if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) {
wp_admin_notice(
Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentytwentyfour/theme.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentytwentythree/theme.json
Original file line number Diff line number Diff line change
@@ -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": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentytwentytwo/theme.json
Original file line number Diff line number Diff line change
@@ -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": [
{
Expand Down
5 changes: 3 additions & 2 deletions src/wp-includes/comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );

Expand Down

0 comments on commit 4f935cd

Please sign in to comment.