Upgrade/Install: Restore Activate button's href native behavior.
Restores the Activate button's `href` native behavior by changing the AJAX activation handler introduced in 6.5.0. It restores the pre-6.5 behavior of clicking the "Activate" button, i.e. navigates the user to the button's `href` (i.e. to the `plugins.php` UI). Why? Feedback was given after shipping [57545] in 6.5.0 (but was unknown during the development and testing cycles) revealed significant impacts for plugins who's users valued the onboarding / configuration experiences. 6.5.3's [58081] and [58083] added a new user action / step to the workflow. Though helpful, it did not fully resolve the impacts. For the minor, this commit seeks to restore only the "Activate" button's `href` pre-6.5 native behavior to resolve the regression. The next phase of the Add Plugins workflow can then continue in a major release to gain the benefits of a full major to move it from ideation through the development phases. (See #61040). The questions of redirect, how / should configuration be in the workflow, etc. can best be explored and experimented with in a major. Follow-up to [57545], [58081], [58083]. Props costdev, jorbin, hellofromTonya, afragen, kevinwhoffman, azaozz, adrianduffell, beaulebens, hmbashar, illuminea, ironprogrammer, jjj, lopo, louiswol94, mikachan, nerrad, mukesh27, peterwilsoncc, pooja1210, smub, swissspidy. Fixes #61319. See #22316, #60992. Built from https://develop.svn.wordpress.org/trunk@58250 git-svn-id: http://core.svn.wordpress.org/trunk@57713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7e59aaf6a9
commit
466f6207e6
|
@ -2664,41 +2664,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.0
|
||||||
|
* @since 6.5.4 Redirect the parent window to the activation URL.
|
||||||
*
|
*
|
||||||
* @param {Event} event Event interface.
|
* @param {Event} event Event interface.
|
||||||
*/
|
*/
|
||||||
$pluginFilter.on( 'click', '.activate-now', function( event ) {
|
$document.on( 'click', '#plugin-information-footer .activate-now', function( event ) {
|
||||||
var $activateButton = $( event.target );
|
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
window.parent.location.href = $( event.target ).attr( 'href' );
|
||||||
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' )
|
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.6-alpha-58249';
|
$wp_version = '6.6-alpha-58250';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
|
|
Loading…
Reference in New Issue