Skip to content

Commit

Permalink
Initial merge with WP 6.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickebates committed Jul 12, 2022
1 parent 50e7144 commit bd6bbbe
Show file tree
Hide file tree
Showing 74 changed files with 718 additions and 362 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Project Nami
===============

### Version: `3.0.0` ###
### Version: `3.0.1` ###

### Description: ###
[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://deploy.azure.com/?repository=https://github.com/ProjectNami/projectnami/tree/latest)
Expand Down
33 changes: 32 additions & 1 deletion wp-admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,37 @@
</nav>
</div>

<div class="about__section changelog">
<div class="column">
<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.',
31
),
'6.0.1',
number_format_i18n( 31 )
);
?>
<?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.0.1' )
)
);
?>
</p>
</div>
</div>

<div class="about__section">
<div class="column">
<h2 class="aligncenter">
Expand Down Expand Up @@ -256,7 +287,7 @@
<div class="about__section has-2-columns is-wider-right">
<div class="column about__image is-vertically-aligned-top">
<a href="https://www.youtube.com/watch?v=oe452WcY7fA">
<img src="https://s.w.org/images/core/6.0/about-60-video.png" alt="<?php echo esc_attr( __( 'Exploring WordPress 6.0 video' ) ); ?>" />
<img src="https://s.w.org/images/core/6.0/about-60-video.png?ver=6.0" alt="<?php echo esc_attr( __( 'Exploring WordPress 6.0 video' ) ); ?>" />
</a>
</div>
<div class="column">
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/themes-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,7 @@ body.full-overlay-active {
#customize-container iframe,
.theme-install-overlay iframe {
height: 100%;
width: 100vw;
width: 100%;
z-index: 20;
transition: opacity 0.3s;
}
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/themes-rtl.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion wp-admin/css/themes.css
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ body.full-overlay-active {
#customize-container iframe,
.theme-install-overlay iframe {
height: 100%;
width: 100vw;
width: 100%;
z-index: 20;
transition: opacity 0.3s;
}
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/themes.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions wp-admin/includes/misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,7 @@ function wp_refresh_post_lock( $response, $data, $screen_id ) {

if ( $user ) {
$error = array(
'name' => $user->display_name,
/* translators: %s: User's display name. */
'text' => sprintf( __( '%s has taken over and is currently editing.' ), $user->display_name ),
);
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/assets/script-loader-packages.php

Large diffs are not rendered by default.

27 changes: 23 additions & 4 deletions wp-includes/block-supports/layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,27 @@ function wp_render_layout_support_flag( $block_content, $block ) {
$used_layout = $default_layout;
}

$class_name = wp_unique_id( 'wp-container-' );
$gap_value = _wp_array_get( $block, array( 'attrs', 'style', 'spacing', 'blockGap' ) );
$class_names = array();
$container_class = wp_unique_id( 'wp-container-' );
$class_names[] = $container_class;

// The following section was added to reintroduce a small set of layout classnames that were
// removed in the 5.9 release (https://github.com/WordPress/gutenberg/issues/38719). It is
// not intended to provide an extended set of classes to match all block layout attributes
// here.
if ( ! empty( $block['attrs']['layout']['orientation'] ) ) {
$class_names[] = 'is-' . sanitize_title( $block['attrs']['layout']['orientation'] );
}

if ( ! empty( $block['attrs']['layout']['justifyContent'] ) ) {
$class_names[] = 'is-content-justification-' . sanitize_title( $block['attrs']['layout']['justifyContent'] );
}

if ( ! empty( $block['attrs']['layout']['flexWrap'] ) && 'nowrap' === $block['attrs']['layout']['flexWrap'] ) {
$class_names[] = 'is-nowrap';
}

$gap_value = _wp_array_get( $block, array( 'attrs', 'style', 'spacing', 'blockGap' ) );
// Skip if gap value contains unsupported characters.
// Regex for CSS value borrowed from `safecss_filter_attr`, and used here
// because we only want to match against the value, not the CSS attribute.
Expand All @@ -188,12 +207,12 @@ function wp_render_layout_support_flag( $block_content, $block ) {
// If a block's block.json skips serialization for spacing or spacing.blockGap,
// don't apply the user-defined value to the styles.
$should_skip_gap_serialization = wp_should_skip_block_supports_serialization( $block_type, 'spacing', 'blockGap' );
$style = wp_get_layout_style( ".$class_name", $used_layout, $has_block_gap_support, $gap_value, $should_skip_gap_serialization, $fallback_gap_value );
$style = wp_get_layout_style( ".$container_class", $used_layout, $has_block_gap_support, $gap_value, $should_skip_gap_serialization, $fallback_gap_value );
// This assumes the hook only applies to blocks with a single wrapper.
// I think this is a reasonable limitation for that particular hook.
$content = preg_replace(
'/' . preg_quote( 'class="', '/' ) . '/',
'class="' . esc_attr( $class_name ) . ' ',
'class="' . esc_attr( implode( ' ', $class_names ) ) . ' ',
$block_content,
1
);
Expand Down
4 changes: 4 additions & 0 deletions wp-includes/block-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ function _block_template_render_without_post_block_context( $context ) {
* @param WP_Query $wp_query Current WP_Query instance, passed by reference.
*/
function _resolve_template_for_new_post( $wp_query ) {
if ( ! $wp_query->is_main_query() ) {
return;
}

remove_filter( 'pre_get_posts', '_resolve_template_for_new_post' );

// Pages.
Expand Down
4 changes: 0 additions & 4 deletions wp-includes/blocks/comment-author-name/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
},
"textAlign": {
"type": "string"
},
"fontSize": {
"type": "string",
"default": "small"
}
},
"usesContext": [ "commentId" ],
Expand Down
3 changes: 0 additions & 3 deletions wp-includes/blocks/comment-date.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ function render_block_core_comment_date( $attributes, $content, $block ) {
}

$classes = '';
if ( isset( $attributes['fontSize'] ) ) {
$classes .= 'has-' . esc_attr( $attributes['fontSize'] ) . '-font-size';
}

$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
$formatted_date = get_comment_date(
Expand Down
4 changes: 0 additions & 4 deletions wp-includes/blocks/comment-date/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
"isLink": {
"type": "boolean",
"default": true
},
"fontSize": {
"type": "string",
"default": "small"
}
},
"usesContext": [ "commentId" ],
Expand Down
4 changes: 0 additions & 4 deletions wp-includes/blocks/comment-edit-link/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
},
"textAlign": {
"type": "string"
},
"fontSize": {
"type": "string",
"default": "small"
}
},
"supports": {
Expand Down
4 changes: 0 additions & 4 deletions wp-includes/blocks/comment-reply-link/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
"attributes": {
"textAlign": {
"type": "string"
},
"fontSize": {
"type": "string",
"default": "small"
}
},
"supports": {
Expand Down
15 changes: 9 additions & 6 deletions wp-includes/blocks/cover.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ function render_block_core_cover( $attributes, $content ) {

$image = get_the_post_thumbnail( null, 'post-thumbnail', $attr );

$content = str_replace(
'</span><div',
'</span>' . $image . '<div',
$content
);

/*
* Inserts the featured image between the (1st) cover 'background' `span` and 'inner_container' `div`,
* and removes eventual withespace characters between the two (typically introduced at template level)
*/
$inner_container_start = '/<div\b[^>]+wp-block-cover__inner-container[\s|"][^>]*>/U';
if ( 1 === preg_match( $inner_container_start, $content, $matches, PREG_OFFSET_CAPTURE ) ) {
$offset = $matches[0][1];
$content = substr( $content, 0, $offset ) . $image . substr( $content, $offset );
}
} else {
if ( in_the_loop() ) {
update_post_thumbnail_cache();
Expand Down
3 changes: 2 additions & 1 deletion wp-includes/blocks/gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ function block_core_gallery_render( $attributes, $content ) {
'wp_footer',
function () use ( $style ) {
echo '<style> ' . $style . '</style>';
}
},
11
);
return $content;
}
Expand Down
1 change: 1 addition & 0 deletions wp-includes/blocks/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ function register_core_block_types_from_metadata() {
'code',
'column',
'columns',
'comments-query-loop',
'embed',
'freeform',
'group',
Expand Down
3 changes: 3 additions & 0 deletions wp-includes/blocks/navigation/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ button.wp-block-navigation-item__content {
font-size: inherit;
font-family: inherit;
line-height: inherit;
font-style: inherit;
font-weight: inherit;
text-transform: inherit;
text-align: right;
}

Expand Down
Loading

0 comments on commit bd6bbbe

Please sign in to comment.