Skip to content

Commit

Permalink
Update to WordPress 6.6.1. For more information, see https://wordpres…
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantheon Automation committed Jul 23, 2024
1 parent 9fea99f commit 5c467d9
Show file tree
Hide file tree
Showing 41 changed files with 281 additions and 108 deletions.
31 changes: 31 additions & 0 deletions wp-admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,37 @@
<a href="contribute.php" class="nav-tab"><?php _e( 'Get Involved' ); ?></a>
</nav>

<div class="about__section changelog has-subtle-background-color">
<div class="column">
<h2><?php _e( 'Maintenance and Security Release' ); ?></h2>
<p>
<?php
printf(
/* translators: 1: WordPress version number, 2: Plural number of bugs. */
_n(
'<strong>Version %1$s</strong> addressed %2$s bug.',
'<strong>Version %1$s</strong> addressed %2$s bugs.',
16
),
'6.6.1',
'16'
);
?>
<?php
printf(
/* translators: %s: HelpHub URL. */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version. */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '6.6.1' )
)
);
?>
</p>
</div>
</div>

<div class="about__section">
<div class="column">
<h2>
Expand Down
12 changes: 1 addition & 11 deletions wp-admin/css/edit-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1272,23 +1272,13 @@ label.post-format-icon {
margin: 0;
}

.categorydiv,
.customlinkdiv,
.posttypediv,
.taxonomydiv {
max-height: inherit;
height: 100%;
}

.wp-tab-panel,
.categorydiv div.tabs-panel,
.customlinkdiv div.tabs-panel,
.posttypediv div.tabs-panel,
.taxonomydiv div.tabs-panel {
min-height: 42px;
/* Allow space for content after tab panels in nav menu editor. */
max-height: calc( 100% - 75px );
height: 100%;
max-height: 200px;
overflow: auto;
padding: 0 0.9em;
border: solid 1px #dcdcde;
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/edit-rtl.min.css

Large diffs are not rendered by default.

12 changes: 1 addition & 11 deletions wp-admin/css/edit.css
Original file line number Diff line number Diff line change
Expand Up @@ -1271,23 +1271,13 @@ label.post-format-icon {
margin: 0;
}

.categorydiv,
.customlinkdiv,
.posttypediv,
.taxonomydiv {
max-height: inherit;
height: 100%;
}

.wp-tab-panel,
.categorydiv div.tabs-panel,
.customlinkdiv div.tabs-panel,
.posttypediv div.tabs-panel,
.taxonomydiv div.tabs-panel {
min-height: 42px;
/* Allow space for content after tab panels in nav menu editor. */
max-height: calc( 100% - 75px );
height: 100%;
max-height: 200px;
overflow: auto;
padding: 0 0.9em;
border: solid 1px #dcdcde;
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/edit.min.css

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions wp-admin/css/nav-menus-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,24 @@ ul.add-menu-item-tabs li {
max-height: inherit;
}

#menu-settings-column .categorydiv,
#menu-settings-column .customlinkdiv,
#menu-settings-column .posttypediv,
#menu-settings-column .taxonomydiv {
max-height: inherit;
height: 100%;
}

#menu-settings-column .wp-tab-panel,
#menu-settings-column .categorydiv div.tabs-panel,
#menu-settings-column .customlinkdiv div.tabs-panel,
#menu-settings-column .posttypediv div.tabs-panel,
#menu-settings-column .taxonomydiv div.tabs-panel {
/* Allow space for content after tab panels in nav menu editor. */
max-height: calc( 100% - 75px );
height: 100%;
}

.metabox-holder-disabled .postbox,
.metabox-holder-disabled .accordion-section-content,
.metabox-holder-disabled .accordion-section-title {
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/nav-menus-rtl.min.css

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions wp-admin/css/nav-menus.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,24 @@ ul.add-menu-item-tabs li {
max-height: inherit;
}

#menu-settings-column .categorydiv,
#menu-settings-column .customlinkdiv,
#menu-settings-column .posttypediv,
#menu-settings-column .taxonomydiv {
max-height: inherit;
height: 100%;
}

#menu-settings-column .wp-tab-panel,
#menu-settings-column .categorydiv div.tabs-panel,
#menu-settings-column .customlinkdiv div.tabs-panel,
#menu-settings-column .posttypediv div.tabs-panel,
#menu-settings-column .taxonomydiv div.tabs-panel {
/* Allow space for content after tab panels in nav menu editor. */
max-height: calc( 100% - 75px );
height: 100%;
}

.metabox-holder-disabled .postbox,
.metabox-holder-disabled .accordion-section-content,
.metabox-holder-disabled .accordion-section-title {
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/nav-menus.min.css

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions wp-admin/includes/update-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,11 @@
'wp-admin/images/about-header-freedoms.svg',
'wp-admin/images/about-header-contribute.svg',
'wp-admin/images/about-header-background.svg',
// 6.6
'wp-includes/blocks/block/editor.css',
'wp-includes/blocks/block/editor.min.css',
'wp-includes/blocks/block/editor-rtl.css',
'wp-includes/blocks/block/editor-rtl.min.css',
);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,22 @@ function get_clean_basedomain() {
return $domain;
}

/**
* Returns the warning message about subdirectory multisites not liking custom wp-content directories.
*
* Applies the 'pantheon.subdirectory_networks_message' filter.
*
* @since 1.4.5
* @return string Warning message or empty string.
*/
function pantheon_get_subdirectory_networks_message() {
if ( apply_filters( 'pantheon.enable_subdirectory_networks_message', true ) ) {
return '<div class="error inline"><p><strong>' . __( 'Warning:' ) . '</strong> ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</p></div>';
}

return '';
}

/**
* Prints step 1 for Network installation process.
*
Expand Down Expand Up @@ -231,7 +247,7 @@ function network_step1( $errors = false ) {
endif;

if ( WP_CONTENT_DIR !== ABSPATH . 'wp-content' && ( allow_subdirectory_install() || ! allow_subdomain_install() ) ) {
echo '<div class="error inline"><p><strong>' . esc_html__( 'Warning:' ) . '</strong> ' . esc_html__( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</p></div>';
echo esc_html( pantheon_get_subdirectory_networks_message() );
}

$is_www = ( 0 === strpos( $hostname, 'www.' ) );
Expand Down Expand Up @@ -595,7 +611,8 @@ function network_step2( $errors = false ) {
);
echo '</p>';
if ( ! $subdomain_install && WP_CONTENT_DIR !== ABSPATH . 'wp-content' ) {
echo '<p><strong>' . esc_html__( 'Warning:' ) . ' ' . esc_html__( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>';
// Display the subdirectory networks message unless filtered.
echo esc_html( pantheon_get_subdirectory_networks_message() );
}
?>
<p class="configuration-rules-label"><label for="network-webconfig-rules">
Expand Down Expand Up @@ -657,7 +674,8 @@ function network_step2( $errors = false ) {
);
echo '</p>';
if ( ! $subdomain_install && WP_CONTENT_DIR !== ABSPATH . 'wp-content' ) {
echo '<p><strong>' . esc_html__( 'Warning:' ) . ' ' . esc_html__( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</strong></p>';
// Display the subdirectory networks message unless filtered.
echo esc_html( pantheon_get_subdirectory_networks_message() );
}
?>
<p class="configuration-rules-label"><label for="network-htaccess-rules">
Expand Down
4 changes: 2 additions & 2 deletions wp-content/mu-plugins/pantheon-mu-plugin/pantheon.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
* Plugin Name: Pantheon
* Plugin URI: https://pantheon.io/
* Description: Building on Pantheon's and WordPress's strengths, together.
* Version: 1.4.4
* Version: 1.4.5
* Author: Pantheon
* Author URI: https://pantheon.io/
*
* @package pantheon
*/

define( 'PANTHEON_MU_PLUGIN_VERSION', '1.4.4' );
define( 'PANTHEON_MU_PLUGIN_VERSION', '1.4.5' );

if ( isset( $_ENV['PANTHEON_ENVIRONMENT'] ) ) {
require_once 'inc/functions.php';
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/assets/script-loader-packages.min.php

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-includes/assets/script-loader-packages.php

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions wp-includes/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,22 @@ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false
* They're added separately because padding might only be set on one side.
*/
if ( isset( $block_spacing_values['declarations']['padding-right'] ) ) {
$padding_right = $block_spacing_values['declarations']['padding-right'];
$padding_right = $block_spacing_values['declarations']['padding-right'];
// Add unit if 0.
if ( '0' === $padding_right ) {
$padding_right = '0px';
}
$layout_styles[] = array(
'selector' => "$selector > .alignfull",
'declarations' => array( 'margin-right' => "calc($padding_right * -1)" ),
);
}
if ( isset( $block_spacing_values['declarations']['padding-left'] ) ) {
$padding_left = $block_spacing_values['declarations']['padding-left'];
$padding_left = $block_spacing_values['declarations']['padding-left'];
// Add unit if 0.
if ( '0' === $padding_left ) {
$padding_left = '0px';
}
$layout_styles[] = array(
'selector' => "$selector > .alignfull",
'declarations' => array( 'margin-left' => "calc($padding_left * -1)" ),
Expand Down
5 changes: 1 addition & 4 deletions wp-includes/blocks/navigation/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@
.wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content,.wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:active,.wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:focus{
text-decoration:line-through;
}
.wp-block-navigation:where(:not([class*=has-text-decoration])) a{
text-decoration:none;
}
.wp-block-navigation:where(:not([class*=has-text-decoration])) a:active,.wp-block-navigation:where(:not([class*=has-text-decoration])) a:focus{
.wp-block-navigation :where(a),.wp-block-navigation :where(a:active),.wp-block-navigation :where(a:focus){
text-decoration:none;
}
.wp-block-navigation .wp-block-navigation__submenu-icon{
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/blocks/navigation/style-rtl.min.css

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions wp-includes/blocks/navigation/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@
.wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content,.wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:active,.wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:focus{
text-decoration:line-through;
}
.wp-block-navigation:where(:not([class*=has-text-decoration])) a{
text-decoration:none;
}
.wp-block-navigation:where(:not([class*=has-text-decoration])) a:active,.wp-block-navigation:where(:not([class*=has-text-decoration])) a:focus{
.wp-block-navigation :where(a),.wp-block-navigation :where(a:active),.wp-block-navigation :where(a:focus){
text-decoration:none;
}
.wp-block-navigation .wp-block-navigation__submenu-icon{
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/blocks/navigation/style.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions wp-includes/class-wp-admin-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,8 @@ public function recursive_render( $id, $node ) {
public function add_menus() {
// User-related, aligned right.
add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 0 );
add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_item', 7 );
add_action( 'admin_bar_menu', 'wp_admin_bar_recovery_mode_menu', 8 );
add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_item', 9991 );
add_action( 'admin_bar_menu', 'wp_admin_bar_recovery_mode_menu', 9992 );
add_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 9999 );

// Site-related.
Expand Down
17 changes: 16 additions & 1 deletion wp-includes/class-wp-theme-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -2879,8 +2879,23 @@ static function ( $pseudo_selector ) use ( $selector ) {
$declarations = static::update_separator_declarations( $declarations );
}

/*
* Top-level element styles using element-only specificity selectors should
* not get wrapped in `:root :where()` to maintain backwards compatibility.
*
* Pseudo classes, e.g. :hover, :focus etc., are a class-level selector so
* still need to be wrapped in `:root :where` to cap specificity for nested
* variations etc. Pseudo selectors won't match the ELEMENTS selector exactly.
*/
$element_only_selector = $current_element &&
isset( static::ELEMENTS[ $current_element ] ) &&
// buttons, captions etc. still need `:root :where()` as they are class based selectors.
! isset( static::__EXPERIMENTAL_ELEMENT_CLASS_NAMES[ $current_element ] ) &&
static::ELEMENTS[ $current_element ] === $selector;

// 2. Generate and append the rules that use the general selector.
$block_rules .= static::to_ruleset( ":root :where($selector)", $declarations );
$general_selector = $element_only_selector ? $selector : ":root :where($selector)";
$block_rules .= static::to_ruleset( $general_selector, $declarations );

// 3. Generate and append the rules that use the duotone selector.
if ( isset( $block_metadata['duotone'] ) && ! empty( $declarations_duotone ) ) {
Expand Down
8 changes: 7 additions & 1 deletion wp-includes/comment-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@
function get_comment_author( $comment_id = 0 ) {
$comment = get_comment( $comment_id );

$comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : (string) $comment_id;
if ( ! empty( $comment->comment_ID ) ) {
$comment_id = $comment->comment_ID;
} elseif ( is_scalar( $comment_id ) ) {
$comment_id = (string) $comment_id;
} else {
$comment_id = '';
}

if ( empty( $comment->comment_author ) ) {
$user = ! empty( $comment->user_id ) ? get_userdata( $comment->user_id ) : false;
Expand Down
41 changes: 39 additions & 2 deletions wp-includes/compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,43 @@ function _wp_can_use_pcre_u( $set = null ) {
return $utf8_pcre;
}

/**
* Indicates if a given slug for a character set represents the UTF-8 text encoding.
*
* A charset is considered to represent UTF-8 if it is a case-insensitive match
* of "UTF-8" with or without the hyphen.
*
* Example:
*
* true === _is_utf8_charset( 'UTF-8' );
* true === _is_utf8_charset( 'utf8' );
* false === _is_utf8_charset( 'latin1' );
* false === _is_utf8_charset( 'UTF 8' );
*
* // Only strings match.
* false === _is_utf8_charset( [ 'charset' => 'utf-8' ] );
*
* `is_utf8_charset` should be used outside of this file.
*
* @ignore
* @since 6.6.1
*
* @param string $charset_slug Slug representing a text character encoding, or "charset".
* E.g. "UTF-8", "Windows-1252", "ISO-8859-1", "SJIS".
*
* @return bool Whether the slug represents the UTF-8 encoding.
*/
function _is_utf8_charset( $charset_slug ) {
if ( ! is_string( $charset_slug ) ) {
return false;
}

return (
0 === strcasecmp( 'UTF-8', $charset_slug ) ||
0 === strcasecmp( 'UTF8', $charset_slug )
);
}

if ( ! function_exists( 'mb_substr' ) ) :
/**
* Compat function to mimic mb_substr().
Expand Down Expand Up @@ -91,7 +128,7 @@ function _mb_substr( $str, $start, $length = null, $encoding = null ) {
* The solution below works only for UTF-8, so in case of a different
* charset just use built-in substr().
*/
if ( ! is_utf8_charset( $encoding ) ) {
if ( ! _is_utf8_charset( $encoding ) ) {
return is_null( $length ) ? substr( $str, $start ) : substr( $str, $start, $length );
}

Expand Down Expand Up @@ -176,7 +213,7 @@ function _mb_strlen( $str, $encoding = null ) {
* The solution below works only for UTF-8, so in case of a different charset
* just use built-in strlen().
*/
if ( ! is_utf8_charset( $encoding ) ) {
if ( ! _is_utf8_charset( $encoding ) ) {
return strlen( $str );
}

Expand Down
1 change: 1 addition & 0 deletions wp-includes/css/dist/block-directory/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
grid-template-columns:auto 1fr;
height:auto;
padding:12px;
position:relative;
text-align:right;
width:100%;
}
Expand Down
Loading

0 comments on commit 5c467d9

Please sign in to comment.