Skip to content

Commit

Permalink
Update to WordPress 6.0.2. For more information, see https://wordpres…
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantheon Automation committed Aug 30, 2022
1 parent 50ce361 commit d2bc45b
Show file tree
Hide file tree
Showing 28 changed files with 10,252 additions and 9,973 deletions.
33 changes: 29 additions & 4 deletions wp-admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,31 @@
<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. More than one security issue. */
_n(
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.',
17
),
'6.0.2',
number_format_i18n( 17 )
);
?>
<?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.2' )
)
);
?>
</p>
<p>
<?php
printf(
Expand Down Expand Up @@ -237,10 +262,10 @@
</div>
<div class="column">
<div class="about__image aligncenter">
<svg width="41" height="40" viewBox="0 0 41 40" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<circle cx="20.5" cy="20" r="12" fill="#fff"/>
<circle cx="20.5" cy="20" r="12" fill="url(#a)"/>
<circle cx="20.5" cy="20" r="12" stroke="#1E1E1E" stroke-width="2"/>
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<circle cx="16" cy="16" r="12" fill="#fff"/>
<circle cx="16" cy="16" r="12" fill="url(#a)"/>
<circle cx="16" cy="16" r="12" stroke="#1E1E1E" stroke-width="2"/>
<defs>
<pattern id="a" patternContentUnits="objectBoundingBox" width=".385" height=".385">
<use xlink:href="#b" transform="scale(.01923)"/>
Expand Down
4 changes: 2 additions & 2 deletions wp-admin/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@
/* translators: 1: Plugin file, 2: Error message. */
__( 'The plugin %1$s has been deactivated due to an error: %2$s' ),
'<code>' . esc_html( $plugin_file ) . '</code>',
$error->get_error_message()
esc_html( $error->get_error_message() )
);
echo '</p></div>';
}
Expand Down Expand Up @@ -676,7 +676,7 @@
printf(
/* translators: %s: Error message. */
__( 'Plugin could not be deleted due to an error: %s' ),
$delete_result->get_error_message()
esc_html( $delete_result->get_error_message() )
);
?>
</p>
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/assets/script-loader-packages.php

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions wp-includes/block-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ function _load_remote_featured_patterns() {
* @access private
*/
function _register_remote_theme_patterns() {
if ( ! get_theme_support( 'core-block-patterns' ) ) {
return;
}

/** This filter is documented in wp-includes/block-patterns.php */
if ( ! apply_filters( 'should_load_remote_block_patterns', true ) ) {
return;
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/block-template-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ function get_block_templates( $query = array(), $template_type = 'wp_template' )

$is_not_custom = false === array_search(
wp_get_theme()->get_stylesheet() . '//' . $template_file['slug'],
array_column( $query_result, 'id' ),
wp_list_pluck( $query_result, 'id' ),
true
);
$fits_slug_query =
Expand Down
1 change: 1 addition & 0 deletions wp-includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) {
'title' => 'title',
'category' => 'category',
'parent' => 'parent',
'ancestor' => 'ancestor',
'icon' => 'icon',
'description' => 'description',
'keywords' => 'keywords',
Expand Down
23 changes: 10 additions & 13 deletions wp-includes/blocks/post-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,16 @@ function render_block_core_post_template( $attributes, $content, $block ) {
$page_key = isset( $block->context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page';
$page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ];

$query_args = build_query_vars_from_query_block( $block, $page );
// Override the custom query with the global query if needed.
// Use global query if needed.
$use_global_query = ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] );
if ( $use_global_query ) {
global $wp_query;
if ( $wp_query && isset( $wp_query->query_vars ) && is_array( $wp_query->query_vars ) ) {
// Unset `offset` because if is set, $wp_query overrides/ignores the paged parameter and breaks pagination.
unset( $query_args['offset'] );
$query_args = wp_parse_args( $wp_query->query_vars, $query_args );

if ( empty( $query_args['post_type'] ) && is_singular() ) {
$query_args['post_type'] = get_post_type( get_the_ID() );
}
}
$query = clone $wp_query;
} else {
$query_args = build_query_vars_from_query_block( $block, $page );
$query = new WP_Query( $query_args );
}

$query = new WP_Query( $query_args );

if ( ! $query->have_posts() ) {
return '';
}
Expand Down Expand Up @@ -107,6 +99,11 @@ function render_block_core_post_template( $attributes, $content, $block ) {
$content .= '<li class="' . esc_attr( $post_classes ) . '">' . $block_content . '</li>';
}

/*
* Use this function to restore the context of the template tags
* from a secondary query loop back to the main query loop.
* Since we use two custom loops, it's safest to always restore.
*/
wp_reset_postdata();

return sprintf(
Expand Down
18 changes: 10 additions & 8 deletions wp-includes/blocks/query-no-results.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,26 @@ function render_block_core_query_no_results( $attributes, $content, $block ) {
return '';
}

$page_key = isset( $block->context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page';
$page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ];
$query_args = build_query_vars_from_query_block( $block, $page );
$page_key = isset( $block->context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page';
$page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ];

// Override the custom query with the global query if needed.
$use_global_query = ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] );
if ( $use_global_query ) {
global $wp_query;
if ( $wp_query && isset( $wp_query->query_vars ) && is_array( $wp_query->query_vars ) ) {
$query_args = wp_parse_args( $wp_query->query_vars, $query_args );
}
$query = $wp_query;
} else {
$query_args = build_query_vars_from_query_block( $block, $page );
$query = new WP_Query( $query_args );
}
$query = new WP_Query( $query_args );

if ( $query->have_posts() ) {
return '';
}

wp_reset_postdata();
if ( ! $use_global_query ) {
wp_reset_postdata();
}

return sprintf(
'<div %1$s>%2$s</div>',
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/bookmark.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ function get_bookmarks( $args = '' ) {
$query .= " $exclusions $inclusions $search";
$query .= " ORDER BY $orderby $order";
if ( -1 != $parsed_args['limit'] ) {
$query .= ' LIMIT ' . $parsed_args['limit'];
$query .= ' LIMIT ' . absint( $parsed_args['limit'] );
}

$results = $wpdb->get_results( $query );
Expand Down
6 changes: 6 additions & 0 deletions wp-includes/css/dist/block-editor/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,12 @@
.block-editor-block-styles__variants .block-editor-block-styles__item.is-active:focus {
box-shadow: inset 0 0 0 1px #fff, 0 0 0 2px var(--wp-admin-theme-color);
}
.block-editor-block-styles__variants .block-editor-block-styles__item-text {
word-break: break-all;
white-space: normal;
text-align: start;
text-align-last: center;
}

.block-editor-block-styles__block-preview-container,
.block-editor-block-styles__block-preview-container * {
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/dist/block-editor/style-rtl.min.css

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions wp-includes/css/dist/block-editor/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,12 @@
.block-editor-block-styles__variants .block-editor-block-styles__item.is-active:focus {
box-shadow: inset 0 0 0 1px #fff, 0 0 0 2px var(--wp-admin-theme-color);
}
.block-editor-block-styles__variants .block-editor-block-styles__item-text {
word-break: break-all;
white-space: normal;
text-align: start;
text-align-last: center;
}

.block-editor-block-styles__block-preview-container,
.block-editor-block-styles__block-preview-container * {
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/css/dist/block-editor/style.min.css

Large diffs are not rendered by default.

76 changes: 44 additions & 32 deletions wp-includes/js/dist/block-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -13468,9 +13468,9 @@ let findTimeout = time => ~(~timeouts.findIndex(t => t.time > time) || ~timeouts
raf.cancel = fn => {
onStartQueue.delete(fn);
onFrameQueue.delete(fn);
onFinishQueue.delete(fn);
updateQueue.delete(fn);
writeQueue.delete(fn);
onFinishQueue.delete(fn);
};

raf.sync = fn => {
Expand Down Expand Up @@ -13569,15 +13569,16 @@ function update() {
pendingCount -= count;
}

if (!pendingCount) {
stop();
return;
}

onStartQueue.flush();
updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667);
onFrameQueue.flush();
writeQueue.flush();
onFinishQueue.flush();

if (!pendingCount) {
stop();
}
}

function makeQueue() {
Expand Down Expand Up @@ -13649,7 +13650,6 @@ var external_React_default = /*#__PURE__*/__webpack_require__.n(external_React_)




function noop() {}
const defineHidden = (obj, key, value) => Object.defineProperty(obj, key, {
value,
Expand Down Expand Up @@ -14343,11 +14343,11 @@ function isAnimatedString(value) {
return react_spring_shared_esm_is.str(value) && (value[0] == '#' || /\d/.test(value) || !isSSR() && cssVariableRegex.test(value) || value in (colors$1 || {}));
}

const react_spring_shared_esm_useLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? external_React_.useLayoutEffect : external_React_.useEffect;
const react_spring_shared_esm_useIsomorphicLayoutEffect = isSSR() ? external_React_.useEffect : external_React_.useLayoutEffect;

const useIsMounted = () => {
const isMounted = (0,external_React_.useRef)(false);
react_spring_shared_esm_useLayoutEffect(() => {
react_spring_shared_esm_useIsomorphicLayoutEffect(() => {
isMounted.current = true;
return () => {
isMounted.current = false;
Expand Down Expand Up @@ -14423,6 +14423,27 @@ function react_spring_shared_esm_usePrev(value) {
return prevRef.current;
}

const useReducedMotion = () => {
const [reducedMotion, setReducedMotion] = useState(null);
react_spring_shared_esm_useIsomorphicLayoutEffect(() => {
const mql = window.matchMedia('(prefers-reduced-motion)');

const handleMediaChange = e => {
setReducedMotion(e.matches);
react_spring_shared_esm_assign({
skipAnimation: e.matches
});
};

handleMediaChange(mql);
mql.addEventListener('change', handleMediaChange);
return () => {
mql.removeEventListener('change', handleMediaChange);
};
}, []);
return reducedMotion;
};



;// CONCATENATED MODULE: ./node_modules/@react-spring/animated/dist/react-spring-animated.esm.js
Expand Down Expand Up @@ -14700,7 +14721,7 @@ const withAnimated = (Component, host) => {

const observer = new PropsObserver(callback, deps);
const observerRef = (0,external_React_.useRef)();
react_spring_shared_esm_useLayoutEffect(() => {
react_spring_shared_esm_useIsomorphicLayoutEffect(() => {
observerRef.current = observer;
react_spring_shared_esm_each(deps, dep => addFluidObserver(dep, observer));
return () => {
Expand Down Expand Up @@ -14948,7 +14969,7 @@ function replaceRef(ctrl, ref) {
}

function useChain(refs, timeSteps, timeFrame = 1000) {
useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
if (timeSteps) {
let prevDelay = 0;
each(refs, (ref, i) => {
Expand Down Expand Up @@ -16794,7 +16815,7 @@ function useSprings(length, props, deps) {
const context = (0,external_React_.useContext)(SpringContext);
const prevContext = react_spring_shared_esm_usePrev(context);
const hasContext = context !== prevContext && hasProps(context);
react_spring_shared_esm_useLayoutEffect(() => {
react_spring_shared_esm_useIsomorphicLayoutEffect(() => {
layoutId.current++;
state.ctrls = ctrls.current;
const {
Expand Down Expand Up @@ -16859,7 +16880,7 @@ function useTrail(length, propsArg, deps) {
return props;
}, deps || [{}]);
const ref = (_passedRef = passedRef) != null ? _passedRef : result[1];
useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
each(ref.current, (ctrl, i) => {
const parent = ref.current[i + (reverse ? 1 : -1)];

Expand Down Expand Up @@ -16933,19 +16954,13 @@ function useTransition(data, props, deps) {
const transitions = [];
const usedTransitions = useRef(null);
const prevTransitions = reset ? null : usedTransitions.current;
useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
usedTransitions.current = transitions;
});
useOnce(() => {
each(usedTransitions.current, t => {
var _t$ctrl$ref;

(_t$ctrl$ref = t.ctrl.ref) == null ? void 0 : _t$ctrl$ref.add(t.ctrl);
const change = changes.get(t);

if (change) {
t.ctrl.start(change.payload);
}
each(transitions, t => {
ref == null ? void 0 : ref.add(t.ctrl);
t.ctrl.ref = ref;
});
return () => {
each(usedTransitions.current, t => {
Expand All @@ -16960,7 +16975,7 @@ function useTransition(data, props, deps) {
});
const keys = getKeys(items, propsFn ? propsFn() : props, prevTransitions);
const expired = reset && usedTransitions.current || [];
useLayoutEffect(() => each(expired, ({
useIsomorphicLayoutEffect(() => each(expired, ({
ctrl,
item,
key
Expand Down Expand Up @@ -17134,7 +17149,7 @@ function useTransition(data, props, deps) {
const context = useContext(SpringContext);
const prevContext = usePrev(context);
const hasContext = context !== prevContext && hasProps(context);
useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
if (hasContext) {
each(transitions, t => {
t.ctrl.start({
Expand All @@ -17149,7 +17164,7 @@ function useTransition(data, props, deps) {
transitions.splice(ind, 1);
}
});
useLayoutEffect(() => {
useIsomorphicLayoutEffect(() => {
each(exitingTransitions.current.size ? exitingTransitions.current : changes, ({
phase,
payload
Expand All @@ -17169,7 +17184,7 @@ function useTransition(data, props, deps) {
if (payload) {
replaceRef(ctrl, payload.ref);

if (ctrl.ref && !forceChange.current) {
if ((ctrl.ref || ref) && !forceChange.current) {
ctrl.update(payload);
} else {
ctrl.start(payload);
Expand Down Expand Up @@ -40224,12 +40239,9 @@ function BlockStyles(_ref3) {
onClick: () => onSelectStylePreview(style),
role: "button",
tabIndex: "0"
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalText, {
as: "span",
limit: 12,
ellipsizeMode: "tail",
className: "block-editor-block-styles__item-text",
truncate: true
}, (0,external_wp_element_namespaceObject.createElement)(external_wp_components_namespaceObject.__experimentalTruncate, {
numberOfLines: 1,
className: "block-editor-block-styles__item-text"
}, buttonText));
})), hoveredStyle && !isMobileViewport && (0,external_wp_element_namespaceObject.createElement)(BlockStylesPreviewPanelFill, {
scope: scope,
Expand Down
Loading

0 comments on commit d2bc45b

Please sign in to comment.