wordpress update 6.6.2

This commit is contained in:
Tony Volpe
2024-09-10 12:45:50 -04:00
parent daa614524b
commit 44b413346f
46 changed files with 309 additions and 174 deletions
+26 -1
View File
@@ -43,7 +43,32 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<div class="about__section changelog has-subtle-background-color"> <div class="about__section changelog has-subtle-background-color">
<div class="column"> <div class="column">
<h2><?php _e( 'Maintenance and Security Release' ); ?></h2> <h2><?php _e( 'Maintenance and Security Releases' ); ?></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.',
26
),
'6.6.2',
'26'
);
?>
<?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.2' )
)
);
?>
</p>
<p> <p>
<?php <?php
printf( printf(
+5 -1
View File
@@ -408,10 +408,14 @@
.about__container h2, .about__container h2,
.about__container h3, .about__container h3,
.about__container h4 { .about__container h4 {
text-wrap: balance; text-wrap: pretty;
color: inherit; color: inherit;
} }
.about__container :is(h1, h2, h3, h4):lang(en) {
text-wrap: balance;
}
.about__container p { .about__container p {
text-wrap: pretty; text-wrap: pretty;
} }
+1 -1
View File
File diff suppressed because one or more lines are too long
+5 -1
View File
@@ -407,10 +407,14 @@
.about__container h2, .about__container h2,
.about__container h3, .about__container h3,
.about__container h4 { .about__container h4 {
text-wrap: balance; text-wrap: pretty;
color: inherit; color: inherit;
} }
.about__container :is(h1, h2, h3, h4):lang(en) {
text-wrap: balance;
}
.about__container p { .about__container p {
text-wrap: pretty; text-wrap: pretty;
} }
+1 -1
View File
File diff suppressed because one or more lines are too long
+9 -7
View File
@@ -84,18 +84,20 @@ if ( $wp_customize->changeset_post_id() ) {
} }
} }
$url = ! empty( $_REQUEST['url'] ) ? sanitize_text_field( $_REQUEST['url'] ) : ''; $url = ! empty( $_REQUEST['url'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['url'] ) ) : '';
$return = ! empty( $_REQUEST['return'] ) ? sanitize_text_field( $_REQUEST['return'] ) : ''; $return = ! empty( $_REQUEST['return'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['return'] ) ) : '';
$autofocus = ! empty( $_REQUEST['autofocus'] ) ? sanitize_text_field( $_REQUEST['autofocus'] ) : ''; $autofocus = ! empty( $_REQUEST['autofocus'] ) && is_array( $_REQUEST['autofocus'] )
? array_map( 'sanitize_text_field', wp_unslash( $_REQUEST['autofocus'] ) )
: array();
if ( ! empty( $url ) ) { if ( ! empty( $url ) ) {
$wp_customize->set_preview_url( wp_unslash( $url ) ); $wp_customize->set_preview_url( $url );
} }
if ( ! empty( $return ) ) { if ( ! empty( $return ) ) {
$wp_customize->set_return_url( wp_unslash( $return ) ); $wp_customize->set_return_url( $return );
} }
if ( ! empty( $autofocus ) && is_array( $autofocus ) ) { if ( ! empty( $autofocus ) ) {
$wp_customize->set_autofocus( wp_unslash( $autofocus ) ); $wp_customize->set_autofocus( $autofocus );
} }
$registered = $wp_scripts->registered; $registered = $wp_scripts->registered;
@@ -1670,6 +1670,18 @@ class WP_Debug_Data {
'raw' => 0, 'raw' => 0,
); );
// If the directory does not exist, skip checking it, as it will skew the other results.
if ( ! is_dir( $path ) ) {
$all_sizes[ $name ] = array(
'path' => $path,
'raw' => 0,
'size' => __( 'The directory does not exist.' ),
'debug' => 'directory not found',
);
continue;
}
if ( microtime( true ) - WP_START_TIMESTAMP < $max_execution_time ) { if ( microtime( true ) - WP_START_TIMESTAMP < $max_execution_time ) {
if ( 'wordpress_size' === $name ) { if ( 'wordpress_size' === $name ) {
$dir_size = recurse_dirsize( $path, $exclude, $max_execution_time ); $dir_size = recurse_dirsize( $path, $exclude, $max_execution_time );
+3 -3
View File
@@ -1354,7 +1354,7 @@ function link_xfn_meta_box( $link ) {
<input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check( 'friendship', 'friend' ); ?> />&nbsp;<?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( 'friend' ); ?> <input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check( 'friendship', 'friend' ); ?> />&nbsp;<?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( 'friend' ); ?>
</label> </label>
<label for="friendship"> <label for="friendship">
<input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check( 'friendship' ); ?> />&nbsp;<?php /* translators: xfn (friendship relation): http://gmpg.org/xfn/ */ _x( 'none', 'Type of relation' ); ?> <input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check( 'friendship' ); ?> />&nbsp;<?php /* translators: xfn (friendship relation): http://gmpg.org/xfn/ */ _ex( 'none', 'Type of relation' ); ?>
</label> </label>
</fieldset></td> </fieldset></td>
</tr> </tr>
@@ -1405,7 +1405,7 @@ function link_xfn_meta_box( $link ) {
<input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check( 'geographical', 'neighbor' ); ?> />&nbsp;<?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( 'neighbor' ); ?> <input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check( 'geographical', 'neighbor' ); ?> />&nbsp;<?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( 'neighbor' ); ?>
</label> </label>
<label for="geographical"> <label for="geographical">
<input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check( 'geographical' ); ?> />&nbsp;<?php /* translators: xfn (geographical relation): http://gmpg.org/xfn/ */ _x( 'none', 'Type of relation' ); ?> <input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check( 'geographical' ); ?> />&nbsp;<?php /* translators: xfn (geographical relation): http://gmpg.org/xfn/ */ _ex( 'none', 'Type of relation' ); ?>
</label> </label>
</fieldset></td> </fieldset></td>
</tr> </tr>
@@ -1434,7 +1434,7 @@ function link_xfn_meta_box( $link ) {
<input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check( 'family', 'spouse' ); ?> />&nbsp;<?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( 'spouse' ); ?> <input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check( 'family', 'spouse' ); ?> />&nbsp;<?php /* translators: xfn: https://gmpg.org/xfn/ */ _e( 'spouse' ); ?>
</label> </label>
<label for="family"> <label for="family">
<input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check( 'family' ); ?> />&nbsp;<?php /* translators: xfn (family relation): http://gmpg.org/xfn/ */ _x( 'none', 'Type of relation' ); ?> <input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check( 'family' ); ?> />&nbsp;<?php /* translators: xfn (family relation): http://gmpg.org/xfn/ */ _ex( 'none', 'Type of relation' ); ?>
</label> </label>
</fieldset></td> </fieldset></td>
</tr> </tr>
+7 -5
View File
@@ -96,7 +96,7 @@ themes.view.Appearance = wp.Backbone.View.extend({
}, },
// Defines search element container. // Defines search element container.
searchContainer: $( '.search-form .search-box' ), searchContainer: $( '.search-form' ),
// Search input and view // Search input and view
// for current theme collection. // for current theme collection.
@@ -118,11 +118,13 @@ themes.view.Appearance = wp.Backbone.View.extend({
// Render and append after screen title. // Render and append after screen title.
view.render(); view.render();
this.searchContainer this.searchContainer
.find( '.search-box' )
.append( $.parseHTML( '<label for="wp-filter-search-input">' + l10n.search + '</label>' ) ) .append( $.parseHTML( '<label for="wp-filter-search-input">' + l10n.search + '</label>' ) )
.append( view.el ) .append( view.el );
.on( 'submit', function( event ) {
event.preventDefault(); this.searchContainer.on( 'submit', function( event ) {
}); event.preventDefault();
});
}, },
// Checks when the user gets close to the bottom // Checks when the user gets close to the bottom
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -4
View File
@@ -62,9 +62,8 @@ function _wp_admin_bar_init() {
* the function is also called late on {@see 'wp_footer'}. * the function is also called late on {@see 'wp_footer'}.
* *
* It includes the {@see 'admin_bar_menu'} action which should be used to hook in and * It includes the {@see 'admin_bar_menu'} action which should be used to hook in and
* add new menus to the admin bar. That way you can be sure that you are adding at most * add new menus to the admin bar. This also gives you access to the `$post` global,
* optimal point, right before the admin bar is rendered. This also gives you access to * among others.
* the `$post` global, among others.
* *
* @since 3.1.0 * @since 3.1.0
* @since 5.4.0 Called on 'wp_body_open' action first, with 'wp_footer' as a fallback. * @since 5.4.0 Called on 'wp_body_open' action first, with 'wp_footer' as a fallback.
@@ -86,7 +85,10 @@ function wp_admin_bar_render() {
/** /**
* Loads all necessary admin bar items. * Loads all necessary admin bar items.
* *
* This is the hook used to add, remove, or manipulate admin bar items. * This hook can add, remove, or manipulate admin bar items. The priority
* determines the placement for new items, and changes to existing items
* would require a high priority. To remove or manipulate existing nodes
* without a specific priority, use `wp_before_admin_bar_render`.
* *
* @since 3.1.0 * @since 3.1.0
* *
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -196,7 +196,7 @@ function wp_render_block_style_variation_support_styles( $parsed_block ) {
return $parsed_block; return $parsed_block;
} }
wp_register_style( 'block-style-variation-styles', false, array( 'global-styles', 'wp-block-library' ) ); wp_register_style( 'block-style-variation-styles', false, array( 'wp-block-library', 'global-styles' ) );
wp_add_inline_style( 'block-style-variation-styles', $variation_styles ); wp_add_inline_style( 'block-style-variation-styles', $variation_styles );
/* /*
+4
View File
@@ -1562,6 +1562,10 @@ function inject_ignored_hooked_blocks_metadata_attributes( $changes, $deprecated
_deprecated_argument( __FUNCTION__, '6.5.3' ); _deprecated_argument( __FUNCTION__, '6.5.3' );
} }
if ( ! isset( $changes->post_content ) ) {
return $changes;
}
$hooked_blocks = get_hooked_blocks(); $hooked_blocks = get_hooked_blocks();
if ( empty( $hooked_blocks ) && ! has_filter( 'hooked_block_types' ) ) { if ( empty( $hooked_blocks ) && ! has_filter( 'hooked_block_types' ) ) {
return $changes; return $changes;
@@ -6,7 +6,7 @@
display:block; display:block;
height:100%; height:100%;
} }
.wp-block-post-featured-image img{ .wp-block-post-featured-image :where(img){
box-sizing:border-box; box-sizing:border-box;
height:auto; height:auto;
max-width:100%; max-width:100%;
@@ -1 +1 @@
.wp-block-post-featured-image{margin-left:0;margin-right:0}.wp-block-post-featured-image a{display:block;height:100%}.wp-block-post-featured-image img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom;width:100%}.wp-block-post-featured-image.alignfull img,.wp-block-post-featured-image.alignwide img{width:100%}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim{background-color:#000;inset:0;position:absolute}.wp-block-post-featured-image{position:relative}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-gradient{background-color:initial}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-0{opacity:0}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-10{opacity:.1}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-20{opacity:.2}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-30{opacity:.3}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-40{opacity:.4}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-50{opacity:.5}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-60{opacity:.6}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-70{opacity:.7}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-80{opacity:.8}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-90{opacity:.9}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-100{opacity:1}.wp-block-post-featured-image:where(.alignleft,.alignright){width:100%} .wp-block-post-featured-image{margin-left:0;margin-right:0}.wp-block-post-featured-image a{display:block;height:100%}.wp-block-post-featured-image :where(img){box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom;width:100%}.wp-block-post-featured-image.alignfull img,.wp-block-post-featured-image.alignwide img{width:100%}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim{background-color:#000;inset:0;position:absolute}.wp-block-post-featured-image{position:relative}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-gradient{background-color:initial}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-0{opacity:0}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-10{opacity:.1}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-20{opacity:.2}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-30{opacity:.3}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-40{opacity:.4}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-50{opacity:.5}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-60{opacity:.6}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-70{opacity:.7}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-80{opacity:.8}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-90{opacity:.9}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-100{opacity:1}.wp-block-post-featured-image:where(.alignleft,.alignright){width:100%}
@@ -6,7 +6,7 @@
display:block; display:block;
height:100%; height:100%;
} }
.wp-block-post-featured-image img{ .wp-block-post-featured-image :where(img){
box-sizing:border-box; box-sizing:border-box;
height:auto; height:auto;
max-width:100%; max-width:100%;
+1 -1
View File
@@ -1 +1 @@
.wp-block-post-featured-image{margin-left:0;margin-right:0}.wp-block-post-featured-image a{display:block;height:100%}.wp-block-post-featured-image img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom;width:100%}.wp-block-post-featured-image.alignfull img,.wp-block-post-featured-image.alignwide img{width:100%}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim{background-color:#000;inset:0;position:absolute}.wp-block-post-featured-image{position:relative}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-gradient{background-color:initial}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-0{opacity:0}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-10{opacity:.1}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-20{opacity:.2}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-30{opacity:.3}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-40{opacity:.4}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-50{opacity:.5}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-60{opacity:.6}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-70{opacity:.7}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-80{opacity:.8}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-90{opacity:.9}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-100{opacity:1}.wp-block-post-featured-image:where(.alignleft,.alignright){width:100%} .wp-block-post-featured-image{margin-left:0;margin-right:0}.wp-block-post-featured-image a{display:block;height:100%}.wp-block-post-featured-image :where(img){box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom;width:100%}.wp-block-post-featured-image.alignfull img,.wp-block-post-featured-image.alignwide img{width:100%}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim{background-color:#000;inset:0;position:absolute}.wp-block-post-featured-image{position:relative}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-gradient{background-color:initial}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-0{opacity:0}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-10{opacity:.1}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-20{opacity:.2}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-30{opacity:.3}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-40{opacity:.4}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-50{opacity:.5}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-60{opacity:.6}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-70{opacity:.7}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-80{opacity:.8}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-90{opacity:.9}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-100{opacity:1}.wp-block-post-featured-image:where(.alignleft,.alignright){width:100%}
+32 -6
View File
@@ -1439,9 +1439,16 @@ class WP_Theme_JSON {
protected function process_blocks_custom_css( $css, $selector ) { protected function process_blocks_custom_css( $css, $selector ) {
$processed_css = ''; $processed_css = '';
if ( empty( $css ) ) {
return $processed_css;
}
// Split CSS nested rules. // Split CSS nested rules.
$parts = explode( '&', $css ); $parts = explode( '&', $css );
foreach ( $parts as $part ) { foreach ( $parts as $part ) {
if ( empty( $part ) ) {
continue;
}
$is_root_css = ( ! str_contains( $part, '{' ) ); $is_root_css = ( ! str_contains( $part, '{' ) );
if ( $is_root_css ) { if ( $is_root_css ) {
// If the part doesn't contain braces, it applies to the root level. // If the part doesn't contain braces, it applies to the root level.
@@ -1454,11 +1461,25 @@ class WP_Theme_JSON {
} }
$nested_selector = $part[0]; $nested_selector = $part[0];
$css_value = $part[1]; $css_value = $part[1];
$part_selector = str_starts_with( $nested_selector, ' ' )
/*
* Handle pseudo elements such as ::before, ::after etc. Regex will also
* capture any leading combinator such as >, +, or ~, as well as spaces.
* This allows pseudo elements as descendants e.g. `.parent ::before`.
*/
$matches = array();
$has_pseudo_element = preg_match( '/([>+~\s]*::[a-zA-Z-]+)/', $nested_selector, $matches );
$pseudo_part = $has_pseudo_element ? $matches[1] : '';
$nested_selector = $has_pseudo_element ? str_replace( $pseudo_part, '', $nested_selector ) : $nested_selector;
// Finalize selector and re-append pseudo element if required.
$part_selector = str_starts_with( $nested_selector, ' ' )
? static::scope_selector( $selector, $nested_selector ) ? static::scope_selector( $selector, $nested_selector )
: static::append_to_selector( $selector, $nested_selector ); : static::append_to_selector( $selector, $nested_selector );
$final_selector = ":root :where($part_selector)"; $final_selector = ":root :where($part_selector)$pseudo_part";
$processed_css .= $final_selector . '{' . trim( $css_value ) . '}';}
$processed_css .= $final_selector . '{' . trim( $css_value ) . '}';
}
} }
return $processed_css; return $processed_css;
} }
@@ -1681,7 +1702,7 @@ class WP_Theme_JSON {
$spacing_rule['selector'] $spacing_rule['selector']
); );
} else { } else {
$format = static::ROOT_BLOCK_SELECTOR === $selector ? '.%2$s %3$s' : '%1$s-%2$s %3$s'; $format = static::ROOT_BLOCK_SELECTOR === $selector ? ':root :where(.%2$s)%3$s' : ':root :where(%1$s-%2$s)%3$s';
$layout_selector = sprintf( $layout_selector = sprintf(
$format, $format,
$selector, $selector,
@@ -2880,6 +2901,9 @@ class WP_Theme_JSON {
} }
/* /*
* Root selector (body) styles should not be wrapped in `:root where()` to keep
* specificity at (0,0,1) and maintain backwards compatibility.
*
* Top-level element styles using element-only specificity selectors should * Top-level element styles using element-only specificity selectors should
* not get wrapped in `:root :where()` to maintain backwards compatibility. * not get wrapped in `:root :where()` to maintain backwards compatibility.
* *
@@ -2887,11 +2911,13 @@ class WP_Theme_JSON {
* still need to be wrapped in `:root :where` to cap specificity for nested * still need to be wrapped in `:root :where` to cap specificity for nested
* variations etc. Pseudo selectors won't match the ELEMENTS selector exactly. * variations etc. Pseudo selectors won't match the ELEMENTS selector exactly.
*/ */
$element_only_selector = $current_element && $element_only_selector = $is_root_selector || (
$current_element &&
isset( static::ELEMENTS[ $current_element ] ) && isset( static::ELEMENTS[ $current_element ] ) &&
// buttons, captions etc. still need `:root :where()` as they are class based selectors. // buttons, captions etc. still need `:root :where()` as they are class based selectors.
! isset( static::__EXPERIMENTAL_ELEMENT_CLASS_NAMES[ $current_element ] ) && ! isset( static::__EXPERIMENTAL_ELEMENT_CLASS_NAMES[ $current_element ] ) &&
static::ELEMENTS[ $current_element ] === $selector; static::ELEMENTS[ $current_element ] === $selector
);
// 2. Generate and append the rules that use the general selector. // 2. Generate and append the rules that use the general selector.
$general_selector = $element_only_selector ? $selector : ":root :where($selector)"; $general_selector = $element_only_selector ? $selector : ":root :where($selector)";
+11 -4
View File
@@ -135,6 +135,9 @@ class Walker {
return; return;
} }
$max_depth = (int) $max_depth;
$depth = (int) $depth;
$id_field = $this->db_fields['id']; $id_field = $this->db_fields['id'];
$id = $element->$id_field; $id = $element->$id_field;
@@ -191,6 +194,8 @@ class Walker {
public function walk( $elements, $max_depth, ...$args ) { public function walk( $elements, $max_depth, ...$args ) {
$output = ''; $output = '';
$max_depth = (int) $max_depth;
// Invalid parameter or nothing to walk. // Invalid parameter or nothing to walk.
if ( $max_depth < -1 || empty( $elements ) ) { if ( $max_depth < -1 || empty( $elements ) ) {
return $output; return $output;
@@ -285,12 +290,14 @@ class Walker {
* @return string XHTML of the specified page of elements. * @return string XHTML of the specified page of elements.
*/ */
public function paged_walk( $elements, $max_depth, $page_num, $per_page, ...$args ) { public function paged_walk( $elements, $max_depth, $page_num, $per_page, ...$args ) {
if ( empty( $elements ) || $max_depth < -1 ) {
return '';
}
$output = ''; $output = '';
$max_depth = (int) $max_depth;
if ( empty( $elements ) || $max_depth < -1 ) {
return $output;
}
$parent_field = $this->db_fields['parent']; $parent_field = $this->db_fields['parent'];
$count = -1; $count = -1;
+1 -1
View File
@@ -2270,7 +2270,7 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"],p.has-text-align-right[
display:block; display:block;
height:100%; height:100%;
} }
.wp-block-post-featured-image img{ .wp-block-post-featured-image :where(img){
box-sizing:border-box; box-sizing:border-box;
height:auto; height:auto;
max-width:100%; max-width:100%;
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -2270,7 +2270,7 @@ p.has-text-align-left[style*="writing-mode:vertical-lr"],p.has-text-align-right[
display:block; display:block;
height:100%; height:100%;
} }
.wp-block-post-featured-image img{ .wp-block-post-featured-image :where(img){
box-sizing:border-box; box-sizing:border-box;
height:auto; height:auto;
max-width:100%; max-width:100%;
File diff suppressed because one or more lines are too long
-5
View File
@@ -85,11 +85,6 @@
content:none; content:none;
} }
.edit-post-visual-editor:not(.is-iframed){
flex:1 0 auto;
height:auto;
}
.edit-post-layout__metaboxes{ .edit-post-layout__metaboxes{
clear:both; clear:both;
flex-shrink:0; flex-shrink:0;
File diff suppressed because one or more lines are too long
-5
View File
@@ -85,11 +85,6 @@
content:none; content:none;
} }
.edit-post-visual-editor:not(.is-iframed){
flex:1 0 auto;
height:auto;
}
.edit-post-layout__metaboxes{ .edit-post-layout__metaboxes{
clear:both; clear:both;
flex-shrink:0; flex-shrink:0;
File diff suppressed because one or more lines are too long
+8 -2
View File
@@ -854,6 +854,14 @@ body.is-fullscreen-mode .interface-interface-skeleton{
height:61px; height:61px;
} }
.editor-editor-interface .interface-interface-skeleton__content{
isolation:isolate;
}
.editor-visual-editor{
flex:1 0 auto;
}
.components-editor-notices__dismissible,.components-editor-notices__pinned{ .components-editor-notices__dismissible,.components-editor-notices__pinned{
color:#1e1e1e; color:#1e1e1e;
left:0; left:0;
@@ -2458,8 +2466,6 @@ h3.components-heading.editor-template-areas__title{
align-items:center; align-items:center;
background-color:#ddd; background-color:#ddd;
display:block; display:block;
height:100%;
isolation:isolate;
position:relative; position:relative;
} }
.editor-visual-editor.is-resizable{ .editor-visual-editor.is-resizable{
File diff suppressed because one or more lines are too long
+8 -2
View File
@@ -854,6 +854,14 @@ body.is-fullscreen-mode .interface-interface-skeleton{
height:61px; height:61px;
} }
.editor-editor-interface .interface-interface-skeleton__content{
isolation:isolate;
}
.editor-visual-editor{
flex:1 0 auto;
}
.components-editor-notices__dismissible,.components-editor-notices__pinned{ .components-editor-notices__dismissible,.components-editor-notices__pinned{
color:#1e1e1e; color:#1e1e1e;
left:0; left:0;
@@ -2458,8 +2466,6 @@ h3.components-heading.editor-template-areas__title{
align-items:center; align-items:center;
background-color:#ddd; background-color:#ddd;
display:block; display:block;
height:100%;
isolation:isolate;
position:relative; position:relative;
} }
.editor-visual-editor.is-resizable{ .editor-visual-editor.is-resizable{
File diff suppressed because one or more lines are too long
@@ -2980,6 +2980,12 @@ class WP_HTML_Tag_Processor {
* @see https://html.spec.whatwg.org/#attributes-3 * @see https://html.spec.whatwg.org/#attributes-3
*/ */
$escaped_new_value = in_array( $comparable_name, wp_kses_uri_attributes() ) ? esc_url( $value ) : esc_attr( $value ); $escaped_new_value = in_array( $comparable_name, wp_kses_uri_attributes() ) ? esc_url( $value ) : esc_attr( $value );
// If the escaping functions wiped out the update, reject it and indicate it was rejected.
if ( '' === $escaped_new_value && '' !== $value ) {
return false;
}
$updated_attribute = "{$name}=\"{$escaped_new_value}\""; $updated_attribute = "{$name}=\"{$escaped_new_value}\"";
} }
@@ -521,6 +521,7 @@ final class WP_Interactivity_API {
* @since 6.5.0 * @since 6.5.0
* @since 6.6.0 The function now adds a warning when the namespace is null, falsy, or the directive value is empty. * @since 6.6.0 The function now adds a warning when the namespace is null, falsy, or the directive value is empty.
* @since 6.6.0 Removed `default_namespace` and `context` arguments. * @since 6.6.0 Removed `default_namespace` and `context` arguments.
* @since 6.6.0 Add support for derived state.
* *
* @param string|true $directive_value The directive attribute value string or `true` when it's a boolean attribute. * @param string|true $directive_value The directive attribute value string or `true` when it's a boolean attribute.
* @return mixed|null The result of the evaluation. Null if the reference path doesn't exist or the namespace is falsy. * @return mixed|null The result of the evaluation. Null if the reference path doesn't exist or the namespace is falsy.
@@ -557,32 +558,32 @@ final class WP_Interactivity_API {
} else { } else {
return null; return null;
} }
}
if ( $current instanceof Closure ) { if ( $current instanceof Closure ) {
/* /*
* This state getter's namespace is added to the stack so that * This state getter's namespace is added to the stack so that
* `state()` or `get_config()` read that namespace when called * `state()` or `get_config()` read that namespace when called
* without specifying one. * without specifying one.
*/ */
array_push( $this->namespace_stack, $ns ); array_push( $this->namespace_stack, $ns );
try { try {
$current = $current(); $current = $current();
} catch ( Throwable $e ) { } catch ( Throwable $e ) {
_doing_it_wrong( _doing_it_wrong(
__METHOD__, __METHOD__,
sprintf( sprintf(
/* translators: 1: Path pointing to an Interactivity API state property, 2: Namespace for an Interactivity API store. */ /* translators: 1: Path pointing to an Interactivity API state property, 2: Namespace for an Interactivity API store. */
__( 'Uncaught error executing a derived state callback with path "%1$s" and namespace "%2$s".' ), __( 'Uncaught error executing a derived state callback with path "%1$s" and namespace "%2$s".' ),
$path, $path,
$ns $ns
), ),
'6.6.0' '6.6.0'
); );
return null; return null;
} finally { } finally {
// Remove the property's namespace from the stack. // Remove the property's namespace from the stack.
array_pop( $this->namespace_stack ); array_pop( $this->namespace_stack );
}
} }
} }
+80 -43
View File
@@ -1574,9 +1574,7 @@ const CSSSelector_1 = __webpack_require__(3467);
const prefixWrapCSSRule = (cssRule, nested, ignoredSelectors, prefixSelector, prefixRootTags) => { const prefixWrapCSSRule = (cssRule, nested, ignoredSelectors, prefixSelector, prefixRootTags) => {
// Check each rule to see if it exactly matches our prefix selector, when // Check each rule to see if it exactly matches our prefix selector, when
// this happens, don't try to prefix that selector. // this happens, don't try to prefix that selector.
const rules = cssRule.selector const rules = cssRule.selectors.filter((selector) => !(0, CSSSelector_1.cssRuleMatchesPrefixSelector)({ selector: selector }, prefixSelector));
.split(",")
.filter((selector) => !(0, CSSSelector_1.cssRuleMatchesPrefixSelector)({ selector: selector }, prefixSelector));
if (rules.length === 0) { if (rules.length === 0) {
return; return;
} }
@@ -10465,6 +10463,11 @@ const {
const STORE_NAME = 'core/block-editor'; const STORE_NAME = 'core/block-editor';
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/utils.js ;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/store/utils.js
/**
* WordPress dependencies
*/
/** /**
* Internal dependencies * Internal dependencies
*/ */
@@ -10472,6 +10475,36 @@ const STORE_NAME = 'core/block-editor';
const withRootClientIdOptionKey = Symbol('withRootClientId'); const withRootClientIdOptionKey = Symbol('withRootClientId');
const parsedPatternCache = new WeakMap();
function parsePattern(pattern) {
const blocks = (0,external_wp_blocks_namespaceObject.parse)(pattern.content, {
__unstableSkipMigrationLogs: true
});
if (blocks.length === 1) {
blocks[0].attributes = {
...blocks[0].attributes,
metadata: {
...(blocks[0].attributes.metadata || {}),
categories: pattern.categories,
patternName: pattern.name,
name: blocks[0].attributes.metadata?.name || pattern.title
}
};
}
return {
...pattern,
blocks
};
}
function getParsedPattern(pattern) {
let parsedPattern = parsedPatternCache.get(pattern);
if (parsedPattern) {
return parsedPattern;
}
parsedPattern = parsePattern(pattern);
parsedPatternCache.set(pattern, parsedPattern);
return parsedPattern;
}
const checkAllowList = (list, item, defaultResult = null) => { const checkAllowList = (list, item, defaultResult = null) => {
if (typeof list === 'boolean') { if (typeof list === 'boolean') {
return list; return list;
@@ -11056,23 +11089,22 @@ const getInserterMediaCategories = (0,external_wp_data_namespaceObject.createSel
*/ */
const hasAllowedPatterns = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (0,external_wp_data_namespaceObject.createSelector)((state, rootClientId = null) => { const hasAllowedPatterns = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (0,external_wp_data_namespaceObject.createSelector)((state, rootClientId = null) => {
const { const {
getAllPatterns, getAllPatterns
__experimentalGetParsedPattern
} = unlock(select(STORE_NAME)); } = unlock(select(STORE_NAME));
const patterns = getAllPatterns(); const patterns = getAllPatterns();
const { const {
allowedBlockTypes allowedBlockTypes
} = getSettings(state); } = getSettings(state);
return patterns.some(({ return patterns.some(pattern => {
name, const {
inserter = true inserter = true
}) => { } = pattern;
if (!inserter) { if (!inserter) {
return false; return false;
} }
const { const {
blocks blocks
} = __experimentalGetParsedPattern(name); } = getParsedPattern(pattern);
return checkAllowListRecursive(blocks, allowedBlockTypes) && blocks.every(({ return checkAllowListRecursive(blocks, allowedBlockTypes) && blocks.every(({
name: blockName name: blockName
}) => canInsertBlockType(state, blockName, rootClientId)); }) => canInsertBlockType(state, blockName, rootClientId));
@@ -13179,30 +13211,10 @@ function __experimentalGetDirectInsertBlock(state, rootClientId = null) {
}); });
return getDirectInsertBlock(state, rootClientId); return getDirectInsertBlock(state, rootClientId);
} }
const __experimentalGetParsedPattern = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (0,external_wp_data_namespaceObject.createSelector)((state, patternName) => { const __experimentalGetParsedPattern = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, patternName) => {
const pattern = unlock(select(STORE_NAME)).getPatternBySlug(patternName); const pattern = unlock(select(STORE_NAME)).getPatternBySlug(patternName);
if (!pattern) { return pattern ? getParsedPattern(pattern) : null;
return null; });
}
const blocks = (0,external_wp_blocks_namespaceObject.parse)(pattern.content, {
__unstableSkipMigrationLogs: true
});
if (blocks.length === 1) {
blocks[0].attributes = {
...blocks[0].attributes,
metadata: {
...(blocks[0].attributes.metadata || {}),
categories: pattern.categories,
patternName: pattern.name,
name: blocks[0].attributes.metadata?.name || pattern.title
}
};
}
return {
...pattern,
blocks
};
}, (state, patternName) => [unlock(select(STORE_NAME)).getPatternBySlug(patternName)]));
const getAllowedPatternsDependants = select => (state, rootClientId) => [...getAllPatternsDependants(select)(state), ...getInsertBlockTypeDependants(state, rootClientId)]; const getAllowedPatternsDependants = select => (state, rootClientId) => [...getAllPatternsDependants(select)(state), ...getInsertBlockTypeDependants(state, rootClientId)];
/** /**
@@ -13216,8 +13228,7 @@ const getAllowedPatternsDependants = select => (state, rootClientId) => [...getA
const __experimentalGetAllowedPatterns = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => { const __experimentalGetAllowedPatterns = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => {
return (0,external_wp_data_namespaceObject.createSelector)((state, rootClientId = null) => { return (0,external_wp_data_namespaceObject.createSelector)((state, rootClientId = null) => {
const { const {
getAllPatterns, getAllPatterns
__experimentalGetParsedPattern: getParsedPattern
} = unlock(select(STORE_NAME)); } = unlock(select(STORE_NAME));
const patterns = getAllPatterns(); const patterns = getAllPatterns();
const { const {
@@ -13225,9 +13236,7 @@ const __experimentalGetAllowedPatterns = (0,external_wp_data_namespaceObject.cre
} = getSettings(state); } = getSettings(state);
const parsedPatterns = patterns.filter(({ const parsedPatterns = patterns.filter(({
inserter = true inserter = true
}) => !!inserter).map(({ }) => !!inserter).map(getParsedPattern);
name
}) => getParsedPattern(name));
const availableParsedPatterns = parsedPatterns.filter(({ const availableParsedPatterns = parsedPatterns.filter(({
blocks blocks
}) => checkAllowListRecursive(blocks, allowedBlockTypes)); }) => checkAllowListRecursive(blocks, allowedBlockTypes));
@@ -34098,7 +34107,7 @@ function getLayoutStyles({
// For fallback gap styles, use lower specificity, to ensure styles do not unintentionally override theme styles. // For fallback gap styles, use lower specificity, to ensure styles do not unintentionally override theme styles.
combinedSelector = selector === ROOT_BLOCK_SELECTOR ? `:where(.${className}${spacingStyle?.selector || ''})` : `:where(${selector}.${className}${spacingStyle?.selector || ''})`; combinedSelector = selector === ROOT_BLOCK_SELECTOR ? `:where(.${className}${spacingStyle?.selector || ''})` : `:where(${selector}.${className}${spacingStyle?.selector || ''})`;
} else { } else {
combinedSelector = selector === ROOT_BLOCK_SELECTOR ? `.${className}${spacingStyle?.selector || ''}` : `${selector}-${className}${spacingStyle?.selector || ''}`; combinedSelector = selector === ROOT_BLOCK_SELECTOR ? `:root :where(.${className})${spacingStyle?.selector || ''}` : `:root :where(${selector}-${className})${spacingStyle?.selector || ''}`;
} }
ruleset += `${combinedSelector} { ${declarations.join('; ')}; }`; ruleset += `${combinedSelector} { ${declarations.join('; ')}; }`;
} }
@@ -34163,7 +34172,10 @@ const getNodesWithStyles = (tree, blockSelectors) => {
if (styles) { if (styles) {
nodes.push({ nodes.push({
styles, styles,
selector: ROOT_BLOCK_SELECTOR selector: ROOT_BLOCK_SELECTOR,
// Root selector (body) styles should not be wrapped in `:root where()` to keep
// specificity at (0,0,1) and maintain backwards compatibility.
skipSelectorWrapper: true
}); });
} }
Object.entries(external_wp_blocks_namespaceObject.__EXPERIMENTAL_ELEMENTS).forEach(([name, selector]) => { Object.entries(external_wp_blocks_namespaceObject.__EXPERIMENTAL_ELEMENTS).forEach(([name, selector]) => {
@@ -34614,10 +34626,16 @@ function updateConfigWithSeparator(config) {
} }
function processCSSNesting(css, blockSelector) { function processCSSNesting(css, blockSelector) {
let processedCSS = ''; let processedCSS = '';
if (!css || css.trim() === '') {
return processedCSS;
}
// Split CSS nested rules. // Split CSS nested rules.
const parts = css.split('&'); const parts = css.split('&');
parts.forEach(part => { parts.forEach(part => {
if (!part || part.trim() === '') {
return;
}
const isRootCss = !part.includes('{'); const isRootCss = !part.includes('{');
if (isRootCss) { if (isRootCss) {
// If the part doesn't contain braces, it applies to the root level. // If the part doesn't contain braces, it applies to the root level.
@@ -34629,8 +34647,27 @@ function processCSSNesting(css, blockSelector) {
return; return;
} }
const [nestedSelector, cssValue] = splittedPart; const [nestedSelector, cssValue] = splittedPart;
const combinedSelector = nestedSelector.startsWith(' ') ? scopeSelector(blockSelector, nestedSelector) : appendToSelector(blockSelector, nestedSelector);
processedCSS += `:root :where(${combinedSelector}){${cssValue.trim()}}`; // Handle pseudo elements such as ::before, ::after, etc. Regex will also
// capture any leading combinator such as >, +, or ~, as well as spaces.
// This allows pseudo elements as descendants e.g. `.parent ::before`.
const matches = nestedSelector.match(/([>+~\s]*::[a-zA-Z-]+)/);
const pseudoPart = matches ? matches[1] : '';
const withoutPseudoElement = matches ? nestedSelector.replace(pseudoPart, '').trim() : nestedSelector.trim();
let combinedSelector;
if (withoutPseudoElement === '') {
// Only contained a pseudo element to use the block selector to form
// the final `:root :where()` selector.
combinedSelector = blockSelector;
} else {
// If the nested selector is a descendant of the block scope it with the
// block selector. Otherwise append it to the block selector.
combinedSelector = nestedSelector.startsWith(' ') ? scopeSelector(blockSelector, withoutPseudoElement) : appendToSelector(blockSelector, withoutPseudoElement);
}
// Build final rule, re-adding any pseudo element outside the `:where()`
// to maintain valid CSS selector.
processedCSS += `:root :where(${combinedSelector})${pseudoPart}{${cssValue.trim()}}`;
} }
}); });
return processedCSS; return processedCSS;
@@ -38494,7 +38531,7 @@ function createBlockCompleter() {
prioritizedBlocks: getBlockListSettings(_rootClientId)?.prioritizedInserterBlocks prioritizedBlocks: getBlockListSettings(_rootClientId)?.prioritizedInserterBlocks
}; };
}, []); }, []);
const [items, categories, collections] = use_block_types_state(rootClientId, block_noop); const [items, categories, collections] = use_block_types_state(rootClientId, block_noop, true);
const filteredItems = (0,external_wp_element_namespaceObject.useMemo)(() => { const filteredItems = (0,external_wp_element_namespaceObject.useMemo)(() => {
const initialFilteredItems = !!filterValue.trim() ? searchBlockItems(items, categories, collections, filterValue) : orderInserterBlockItems(orderBy(items, 'frecency', 'desc'), prioritizedBlocks); const initialFilteredItems = !!filterValue.trim() ? searchBlockItems(items, categories, collections, filterValue) : orderInserterBlockItems(orderBy(items, 'frecency', 'desc'), prioritizedBlocks);
return initialFilteredItems.filter(item => item.name !== selectedBlockName).slice(0, SHOWN_BLOCK_TYPES); return initialFilteredItems.filter(item => item.name !== selectedBlockName).slice(0, SHOWN_BLOCK_TYPES);
File diff suppressed because one or more lines are too long
+8 -17
View File
@@ -2557,8 +2557,8 @@ function usePaddingAppender() {
const { const {
defaultView defaultView
} = ownerDocument; } = ownerDocument;
const paddingBottom = defaultView.parseInt(defaultView.getComputedStyle(node).paddingBottom, 10); const pseudoHeight = defaultView.parseInt(defaultView.getComputedStyle(node, ':after').height, 10);
if (!paddingBottom) { if (!pseudoHeight) {
return; return;
} }
@@ -2571,20 +2571,15 @@ function usePaddingAppender() {
if (event.clientY < lastChildRect.bottom) { if (event.clientY < lastChildRect.bottom) {
return; return;
} }
event.preventDefault(); event.stopPropagation();
const blockOrder = registry.select(external_wp_blockEditor_namespaceObject.store).getBlockOrder(''); const blockOrder = registry.select(external_wp_blockEditor_namespaceObject.store).getBlockOrder('');
const lastBlockClientId = blockOrder[blockOrder.length - 1]; const lastBlockClientId = blockOrder[blockOrder.length - 1];
// Do nothing when only default block appender is present.
if (!lastBlockClientId) {
return;
}
const lastBlock = registry.select(external_wp_blockEditor_namespaceObject.store).getBlock(lastBlockClientId); const lastBlock = registry.select(external_wp_blockEditor_namespaceObject.store).getBlock(lastBlockClientId);
const { const {
selectBlock, selectBlock,
insertDefaultBlock insertDefaultBlock
} = registry.dispatch(external_wp_blockEditor_namespaceObject.store); } = registry.dispatch(external_wp_blockEditor_namespaceObject.store);
if ((0,external_wp_blocks_namespaceObject.isUnmodifiedDefaultBlock)(lastBlock)) { if (lastBlock && (0,external_wp_blocks_namespaceObject.isUnmodifiedDefaultBlock)(lastBlock)) {
selectBlock(lastBlockClientId); selectBlock(lastBlockClientId);
} else { } else {
insertDefaultBlock(); insertDefaultBlock();
@@ -2701,7 +2696,6 @@ function useEditorStyles() {
hasThemeStyleSupport, hasThemeStyleSupport,
editorSettings, editorSettings,
isZoomedOutView, isZoomedOutView,
hasMetaBoxes,
renderingMode, renderingMode,
postType postType
} = (0,external_wp_data_namespaceObject.useSelect)(select => { } = (0,external_wp_data_namespaceObject.useSelect)(select => {
@@ -2717,7 +2711,6 @@ function useEditorStyles() {
hasThemeStyleSupport: select(store).isFeatureActive('themeStyles'), hasThemeStyleSupport: select(store).isFeatureActive('themeStyles'),
editorSettings: select(external_wp_editor_namespaceObject.store).getEditorSettings(), editorSettings: select(external_wp_editor_namespaceObject.store).getEditorSettings(),
isZoomedOutView: __unstableGetEditorMode() === 'zoom-out', isZoomedOutView: __unstableGetEditorMode() === 'zoom-out',
hasMetaBoxes: select(store).hasMetaBoxes(),
renderingMode: getRenderingMode(), renderingMode: getRenderingMode(),
postType: _postType postType: _postType
}; };
@@ -2747,13 +2740,11 @@ function useEditorStyles() {
} }
const baseStyles = hasThemeStyles ? (_editorSettings$style3 = editorSettings.styles) !== null && _editorSettings$style3 !== void 0 ? _editorSettings$style3 : [] : defaultEditorStyles; const baseStyles = hasThemeStyles ? (_editorSettings$style3 = editorSettings.styles) !== null && _editorSettings$style3 !== void 0 ? _editorSettings$style3 : [] : defaultEditorStyles;
// Add a constant padding for the typewriter effect. When typing at the // Add a space for the typewriter effect. When typing in the last block,
// bottom, there needs to be room to scroll up. // there needs to be room to scroll up.
if (!isZoomedOutView && !hasMetaBoxes && renderingMode === 'post-only' && !DESIGN_POST_TYPES.includes(postType)) { if (!isZoomedOutView && renderingMode === 'post-only' && !DESIGN_POST_TYPES.includes(postType)) {
return [...baseStyles, { return [...baseStyles, {
// Should override global styles padding, so ensure 0-1-0 css: ':root :where(.editor-styles-wrapper)::after {content: ""; display: block; height: 40vh;}'
// specificity.
css: ':root :where(body){padding-bottom: 40vh}'
}]; }];
} }
return baseStyles; return baseStyles;
File diff suppressed because one or more lines are too long
+5 -2
View File
@@ -25133,6 +25133,9 @@ function bulk_actions_ActionWithModal({
const onCloseModal = (0,external_wp_element_namespaceObject.useCallback)(() => { const onCloseModal = (0,external_wp_element_namespaceObject.useCallback)(() => {
setActionWithModal(undefined); setActionWithModal(undefined);
}, [setActionWithModal]); }, [setActionWithModal]);
if (!eligibleItems.length) {
return null;
}
const label = typeof action.label === 'string' ? action.label : action.label(selectedItems); const label = typeof action.label === 'string' ? action.label : action.label(selectedItems);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, { return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
title: !hideModalHeader ? label : undefined, title: !hideModalHeader ? label : undefined,
@@ -35575,7 +35578,7 @@ function usePostTypeArchiveMenuItems() {
// `icon` is the `menu_icon` property of a post type. We // `icon` is the `menu_icon` property of a post type. We
// only handle `dashicons` for now, even if the `menu_icon` // only handle `dashicons` for now, even if the `menu_icon`
// also supports urls and svg as values. // also supports urls and svg as values.
icon: postType.icon?.startsWith('dashicons-') ? postType.icon.slice(10) : library_archive, icon: typeof postType.icon === 'string' && postType.icon.startsWith('dashicons-') ? postType.icon.slice(10) : library_archive,
templatePrefix: 'archive' templatePrefix: 'archive'
}; };
}) || [], [postTypesWithArchives, existingTemplates, needsUniqueIdentifier]); }) || [], [postTypesWithArchives, existingTemplates, needsUniqueIdentifier]);
@@ -35653,7 +35656,7 @@ const usePostTypeMenuItems = onClickMenuItem => {
// `icon` is the `menu_icon` property of a post type. We // `icon` is the `menu_icon` property of a post type. We
// only handle `dashicons` for now, even if the `menu_icon` // only handle `dashicons` for now, even if the `menu_icon`
// also supports urls and svg as values. // also supports urls and svg as values.
icon: icon?.startsWith('dashicons-') ? icon.slice(10) : library_post, icon: typeof icon === 'string' && icon.startsWith('dashicons-') ? icon.slice(10) : library_post,
templatePrefix: templatePrefixes[slug] templatePrefix: templatePrefixes[slug]
}; };
const hasEntities = postTypesInfo?.[slug]?.hasEntities; const hasEntities = postTypesInfo?.[slug]?.hasEntities;
File diff suppressed because one or more lines are too long
+8 -5
View File
@@ -5946,7 +5946,7 @@ const getPostIcon = (0,external_wp_data_namespaceObject.createRegistrySelector)(
// `icon` is the `menu_icon` property of a post type. We // `icon` is the `menu_icon` property of a post type. We
// only handle `dashicons` for now, even if the `menu_icon` // only handle `dashicons` for now, even if the `menu_icon`
// also supports urls and svg as values. // also supports urls and svg as values.
if (postTypeEntity?.icon?.startsWith('dashicons-')) { if (typeof postTypeEntity?.icon === 'string' && postTypeEntity.icon.startsWith('dashicons-')) {
return postTypeEntity.icon.slice(10); return postTypeEntity.icon.slice(10);
} }
return library_page; return library_page;
@@ -26000,12 +26000,14 @@ function usePostActions({
postTypeObject, postTypeObject,
resource, resource,
cachedCanUserResolvers, cachedCanUserResolvers,
userCanCreatePostType userCanCreatePostType,
isBlockBasedTheme
} = (0,external_wp_data_namespaceObject.useSelect)(select => { } = (0,external_wp_data_namespaceObject.useSelect)(select => {
const { const {
getPostType, getPostType,
getCachedResolvers, getCachedResolvers,
canUser canUser,
getCurrentTheme
} = select(external_wp_coreData_namespaceObject.store); } = select(external_wp_coreData_namespaceObject.store);
const _postTypeObject = getPostType(postType); const _postTypeObject = getPostType(postType);
const _resource = _postTypeObject?.rest_base || ''; const _resource = _postTypeObject?.rest_base || '';
@@ -26013,7 +26015,8 @@ function usePostActions({
postTypeObject: _postTypeObject, postTypeObject: _postTypeObject,
resource: _resource, resource: _resource,
cachedCanUserResolvers: getCachedResolvers()?.canUser, cachedCanUserResolvers: getCachedResolvers()?.canUser,
userCanCreatePostType: canUser('create', _resource) userCanCreatePostType: canUser('create', _resource),
isBlockBasedTheme: getCurrentTheme()?.is_block_theme
}; };
}, [postType]); }, [postType]);
const trashPostActionForPostType = useTrashPostAction(resource); const trashPostActionForPostType = useTrashPostAction(resource);
@@ -26029,7 +26032,7 @@ function usePostActions({
if (!isLoaded) { if (!isLoaded) {
return []; return [];
} }
let actions = [postTypeObject?.viewable && viewPostAction, supportsRevisions && postRevisionsAction, false ? 0 : false, isTemplateOrTemplatePart && userCanCreatePostType && duplicateTemplatePartAction, isPattern && userCanCreatePostType && duplicatePatternAction, supportsTitle && renamePostActionForPostType, isPattern && exportPatternAsJSONAction, isTemplateOrTemplatePart ? resetTemplateAction : restorePostActionForPostType, isTemplateOrTemplatePart || isPattern ? deletePostAction : trashPostActionForPostType, !isTemplateOrTemplatePart && permanentlyDeletePostActionForPostType].filter(Boolean); let actions = [postTypeObject?.viewable && viewPostAction, supportsRevisions && postRevisionsAction, false ? 0 : false, isTemplateOrTemplatePart && userCanCreatePostType && isBlockBasedTheme && duplicateTemplatePartAction, isPattern && userCanCreatePostType && duplicatePatternAction, supportsTitle && renamePostActionForPostType, isPattern && exportPatternAsJSONAction, isTemplateOrTemplatePart ? resetTemplateAction : restorePostActionForPostType, isTemplateOrTemplatePart || isPattern ? deletePostAction : trashPostActionForPostType, !isTemplateOrTemplatePart && permanentlyDeletePostActionForPostType].filter(Boolean);
// Filter actions based on provided context. If not provided // Filter actions based on provided context. If not provided
// all actions are returned. We'll have a single entry for getting the actions // all actions are returned. We'll have a single entry for getting the actions
// and the consumer should provide the context to filter the actions, if needed. // and the consumer should provide the context to filter the actions, if needed.
File diff suppressed because one or more lines are too long
+9 -9
View File
@@ -840,7 +840,7 @@ function wp_print_media_templates() {
<?php esc_html_e( 'Right' ); ?> <?php esc_html_e( 'Right' ); ?>
</option> </option>
<option value="none" selected> <option value="none" selected>
<?php esc_html_x( 'None', 'Alignment' ); ?> <?php echo esc_html_x( 'None', 'Alignment option' ); ?>
</option> </option>
</select> </select>
</span> </span>
@@ -867,7 +867,7 @@ function wp_print_media_templates() {
<option value="file"> <option value="file">
<# } else { #> <# } else { #>
<option value="none" selected> <option value="none" selected>
<?php esc_html_x( 'None', 'Embedded player type' ); ?> <?php echo esc_html_x( 'None', 'Media item link option' ); ?>
</option> </option>
<option value="file"> <option value="file">
<# } #> <# } #>
@@ -952,7 +952,7 @@ function wp_print_media_templates() {
<?php esc_html_e( 'Media File' ); ?> <?php esc_html_e( 'Media File' ); ?>
</option> </option>
<option value="none" <# if ( 'none' === wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>> <option value="none" <# if ( 'none' === wp.media.galleryDefaults.link ) { #>selected="selected"<# } #>>
<?php esc_html_x( 'None', 'Media link target' ); ?> <?php echo esc_html_x( 'None', 'Media item link option' ); ?>
</option> </option>
</select> </select>
</span> </span>
@@ -1096,7 +1096,7 @@ function wp_print_media_templates() {
<?php esc_html_e( 'Right' ); ?> <?php esc_html_e( 'Right' ); ?>
</button> </button>
<button class="button active" value="none"> <button class="button active" value="none">
<?php esc_html_x( 'None', 'Alignment' ); ?> <?php echo esc_html_x( 'None', 'Alignment option' ); ?>
</button> </button>
</span> </span>
</span> </span>
@@ -1113,7 +1113,7 @@ function wp_print_media_templates() {
<?php esc_html_e( 'Custom URL' ); ?> <?php esc_html_e( 'Custom URL' ); ?>
</button> </button>
<button class="button active" value="none"> <button class="button active" value="none">
<?php esc_html_x( 'None', 'Media URL' ); ?> <?php echo esc_html_x( 'None', 'Media item link option' ); ?>
</button> </button>
</span> </span>
</span> </span>
@@ -1160,7 +1160,7 @@ function wp_print_media_templates() {
<?php esc_html_e( 'Right' ); ?> <?php esc_html_e( 'Right' ); ?>
</button> </button>
<button class="button active" value="none"> <button class="button active" value="none">
<?php esc_html_x( 'None', 'Alignment' ); ?> <?php echo esc_html_x( 'None', 'Alignment option' ); ?>
</button> </button>
</span> </span>
</span> </span>
@@ -1236,7 +1236,7 @@ function wp_print_media_templates() {
<?php esc_html_e( 'Custom URL' ); ?> <?php esc_html_e( 'Custom URL' ); ?>
</option> </option>
<option value="none"> <option value="none">
<?php esc_html_x( 'None', 'Media URL' ); ?> <?php echo esc_html_x( 'None', 'Media item link option' ); ?>
</option> </option>
</select> </select>
</span> </span>
@@ -1356,7 +1356,7 @@ function wp_print_media_templates() {
<span class="button-group button-large" data-setting="preload"> <span class="button-group button-large" data-setting="preload">
<button class="button" value="auto"><?php _ex( 'Auto', 'auto preload' ); ?></button> <button class="button" value="auto"><?php _ex( 'Auto', 'auto preload' ); ?></button>
<button class="button" value="metadata"><?php _e( 'Metadata' ); ?></button> <button class="button" value="metadata"><?php _e( 'Metadata' ); ?></button>
<button class="button active" value="none"><?php _x( 'None', 'Preload type' ); ?></button> <button class="button active" value="none"><?php _ex( 'None', 'Preload value' ); ?></button>
</span> </span>
</span> </span>
</fieldset> </fieldset>
@@ -1455,7 +1455,7 @@ function wp_print_media_templates() {
<span class="button-group button-large" data-setting="preload"> <span class="button-group button-large" data-setting="preload">
<button class="button" value="auto"><?php _ex( 'Auto', 'auto preload' ); ?></button> <button class="button" value="auto"><?php _ex( 'Auto', 'auto preload' ); ?></button>
<button class="button" value="metadata"><?php _e( 'Metadata' ); ?></button> <button class="button" value="metadata"><?php _e( 'Metadata' ); ?></button>
<button class="button active" value="none"><?php _x( 'None', 'Preload type' ); ?></button> <button class="button active" value="none"><?php _ex( 'None', 'Preload value' ); ?></button>
</span> </span>
</span> </span>
</fieldset> </fieldset>
+7 -3
View File
@@ -1366,13 +1366,17 @@ function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac
* (which is to say, when they share the domain name of the current request). * (which is to say, when they share the domain name of the current request).
*/ */
if ( is_ssl() && ! str_starts_with( $image_baseurl, 'https' ) ) { if ( is_ssl() && ! str_starts_with( $image_baseurl, 'https' ) ) {
// Since the `Host:` header might contain a port we should /*
// compare it against the image URL using the same port. * Since the `Host:` header might contain a port, it should
* be compared against the image URL using the same port.
*/
$parsed = parse_url( $image_baseurl ); $parsed = parse_url( $image_baseurl );
$domain = $parsed['host']; $domain = isset( $parsed['host'] ) ? $parsed['host'] : '';
if ( isset( $parsed['port'] ) ) { if ( isset( $parsed['port'] ) ) {
$domain .= ':' . $parsed['port']; $domain .= ':' . $parsed['port'];
} }
if ( $_SERVER['HTTP_HOST'] === $domain ) { if ( $_SERVER['HTTP_HOST'] === $domain ) {
$image_baseurl = set_url_scheme( $image_baseurl, 'https' ); $image_baseurl = set_url_scheme( $image_baseurl, 'https' );
} }
+1 -1
View File
@@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.6.1'; $wp_version = '6.6.2';
/** /**
* 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.