Skip to content

Commit

Permalink
Update to WordPress 6.5.4. For more information, see https://wordpres…
Browse files Browse the repository at this point in the history
  • Loading branch information
Pantheon Automation committed Jun 5, 2024
1 parent c66e78b commit d45f055
Show file tree
Hide file tree
Showing 12 changed files with 128 additions and 154 deletions.
25 changes: 25 additions & 0 deletions wp-admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,31 @@
<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.',
10
),
'6.5.4',
'5'
);
?>
<?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.5.4' )
)
);
?>
</p>
<p>
<?php
printf(
Expand Down
19 changes: 0 additions & 19 deletions wp-admin/css/common-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -1514,25 +1514,6 @@ div.error {
margin-top: -5px;
}

#plugin-information-footer #plugin-activated-successfully {
margin-bottom: 0;
}

#plugin-information-footer #plugin-activated-successfully p {
display: flex;
gap: 1em;
align-items: center;
justify-content: space-between;
margin: 0;
}

#plugin-information-footer #plugin-activated-successfully .refresh-page {
flex-grow: 0;
line-height: 2.15384615;
min-height: 0;
margin-bottom: 0;
}

.update-message p:before,
.updating-message p:before,
.updated-message p:before,
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/common-rtl.min.css

Large diffs are not rendered by default.

19 changes: 0 additions & 19 deletions wp-admin/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -1513,25 +1513,6 @@ div.error {
margin-top: -5px;
}

#plugin-information-footer #plugin-activated-successfully {
margin-bottom: 0;
}

#plugin-information-footer #plugin-activated-successfully p {
display: flex;
gap: 1em;
align-items: center;
justify-content: space-between;
margin: 0;
}

#plugin-information-footer #plugin-activated-successfully .refresh-page {
flex-grow: 0;
line-height: 2.15384615;
min-height: 0;
margin-bottom: 0;
}

.update-message p:before,
.updating-message p:before,
.updated-message p:before,
Expand Down
2 changes: 1 addition & 1 deletion wp-admin/css/common.min.css

Large diffs are not rendered by default.

104 changes: 15 additions & 89 deletions wp-admin/js/updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -1105,33 +1105,21 @@
*
* @since 6.5.0
*
* @param {Object} response Response from the server.
* @param {string} response.slug Slug of the activated plugin.
* @param {string} response.pluginName Name of the activated plugin.
* @param {string} response.plugin The plugin file, relative to the plugins directory.
* @param {Object} response Response from the server.
* @param {string} response.slug Slug of the activated plugin.
* @param {string} response.pluginName Name of the activated plugin.
* @param {string} response.plugin The plugin file, relative to the plugins directory.
*/
wp.updates.activatePluginSuccess = function( response ) {
var $message = $( '.plugin-card-' + response.slug + ', #plugin-information-footer' ).find( '.activating-message' ),
isInModal = 'plugin-information-footer' === $message.parent().attr( 'id' ),
buttonText = _x( 'Activated!', 'plugin' ),
ariaLabel = sprintf(
/* translators: %s: The plugin name. */
'%s activated successfully.',
response.pluginName
),
noticeData = {
id: 'plugin-activated-successfully',
className: 'notice-success',
message: sprintf(
/* translators: %s: The refresh link's attributes. */
__( 'Plugin activated. Some changes may not occur until you refresh the page. <a %s>Refresh Now</a>' ),
'href="#" class="button button-secondary refresh-page"'
),
slug: response.slug
},
noticeTarget;
);

wp.a11y.speak( __( 'Activation completed successfully. Some changes may not occur until you refresh the page.' ) );
wp.a11y.speak( __( 'Activation completed successfully.' ) );
$document.trigger( 'wp-plugin-activate-success', response );

$message
Expand All @@ -1140,7 +1128,7 @@
.attr( 'aria-label', ariaLabel )
.text( buttonText );

if ( isInModal ) {
if ( 'plugin-information-footer' === $message.parent().attr( 'id' ) ) {
wp.updates.setCardButtonStatus(
{
status: 'activated-plugin',
Expand All @@ -1151,26 +1139,13 @@
ariaLabel: ariaLabel
}
);

// Add a notice to the modal's footer.
$message.replaceWith( wp.updates.adminNotice( noticeData ) );

// Send notice information back to the parent screen.
noticeTarget = window.parent === window ? null : window.parent;
$.support.postMessage = !! window.postMessage;
if ( false !== $.support.postMessage && null !== noticeTarget && -1 === window.parent.location.pathname.indexOf( 'index.php' ) ) {
noticeTarget.postMessage(
JSON.stringify( noticeData ),
window.location.origin
);
}
} else {
// Add a notice to the top of the screen.
wp.updates.addAdminNotice( noticeData );
}

setTimeout( function() {
if ( isInModal ) {
$message.removeClass( 'activated-message' )
.text( _x( 'Active', 'plugin' ) );

if ( 'plugin-information-footer' === $message.parent().attr( 'id' ) ) {
wp.updates.setCardButtonStatus(
{
status: 'plugin-active',
Expand All @@ -1184,8 +1159,6 @@
)
}
);
} else {
$message.removeClass( 'activated-message' ).text( _x( 'Active', 'plugin' ) );
}
}, 1000 );
};
Expand Down Expand Up @@ -2664,41 +2637,16 @@
} );

/**
* Click handler for plugin activations in plugin activation view.
* Click handler for plugin activations in plugin activation modal view.
*
* @since 6.5.0
* @since 6.5.4 Redirect the parent window to the activation URL.
*
* @param {Event} event Event interface.
*/
$pluginFilter.on( 'click', '.activate-now', function( event ) {
var $activateButton = $( event.target );

$document.on( 'click', '#plugin-information-footer .activate-now', function( event ) {
event.preventDefault();

if ( $activateButton.hasClass( 'activating-message' ) || $activateButton.hasClass( 'button-disabled' ) ) {
return;
}

$activateButton
.removeClass( 'activate-now button-primary' )
.addClass( 'activating-message' )
.attr(
'aria-label',
sprintf(
/* translators: %s: Plugin name. */
_x( 'Activating %s', 'plugin' ),
$activateButton.data( 'name' )
)
)
.text( __( 'Activating...' ) );

wp.updates.activatePlugin(
{
name: $activateButton.data( 'name' ),
slug: $activateButton.data( 'slug' ),
plugin: $activateButton.data( 'plugin' )
}
);
window.parent.location.href = $( event.target ).attr( 'href' );
});

/**
Expand Down Expand Up @@ -3253,11 +3201,6 @@
return;
}

if ( 'undefined' !== typeof message.id && 'plugin-activated-successfully' === message.id ) {
wp.updates.addAdminNotice( message );
return;
}

if (
'undefined' !== typeof message.status &&
'undefined' !== typeof message.slug &&
Expand Down Expand Up @@ -3490,22 +3433,5 @@
} );
}
);

/**
* Click handler for page refresh link.
*
* @since 6.5.3
*
* @param {Event} event Event interface.
*/
$document.on( 'click', '.refresh-page', function( event ) {
event.preventDefault();

if ( window.parent === window ) {
window.location.reload();
} else {
window.parent.location.reload();
}
} );
} );
})( jQuery, window.wp, window._wpUpdatesSettings );
2 changes: 1 addition & 1 deletion wp-admin/js/updates.min.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ function network_step2( $errors = false ) {
<?php
printf(
/* translators: 1: wp-config.php, 2: Location of wp-config file, 3: Translated version of "That's all, stop editing! Happy publishing." */
esc_html__( 'Add the following to your %1$s file in %2$s <strong>above</strong> the line reading %3$s:' ),
wp_kses_post( __( 'Add the following to your %1$s file in %2$s <strong>above</strong> the line reading %3$s:' ) ),
'<code>' . $config_filename . '</code>', // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
'<code>' . $location_of_wp_config . '</code>', // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
// translators: This string should only be translated if wp-config-sample.php is localized.
Expand All @@ -456,8 +456,8 @@ function network_step2( $errors = false ) {
);
?>
</label></p>
<textarea id="network-wpconfig-rules" class="code" readonly="readonly" cols="100" rows="31" aria-describedby="network-wpconfig-rules-description">
<?php ob_start(); ?>
<textarea id="network-wpconfig-rules" class="code" readonly="readonly" cols="100" rows="8" aria-describedby="network-wpconfig-rules-description">
<?php ob_start(); // phpcs:ignore Generic.WhiteSpace.ScopeIndent.Incorrect ?>
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', <?php echo $subdomain_install ? 'true' : 'false'; ?> );
// Use PANTHEON_HOSTNAME if in a Pantheon environment, otherwise use HTTP_HOST.
Expand Down
Loading

0 comments on commit d45f055

Please sign in to comment.