Dashboard: Remove "Try Gutenberg" callout.

Reverting this for 4.9. It will be added back in a future version of WordPress. This doesn't mean that you shouldn't be trying Gutenberg, just that it isn't ready for a call out to a larger audience. But if you are the type to read commit messages, https://github.com/WordPress/gutenberg could use your pull requests and comments on issues.

Reverts [41931] [41900] [41896] [41895]
See #41316


Built from https://develop.svn.wordpress.org/trunk@41978


git-svn-id: http://core.svn.wordpress.org/trunk@41812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Aaron Jorbin
2017-10-23 20:48:47 +00:00
parent c364743d35
commit b8fc8cb59c
20 changed files with 55 additions and 337 deletions

View File

@@ -31,48 +31,6 @@ jQuery(document).ready( function($) {
updateWelcomePanel( this.checked ? 1 : 0 );
});
var tryGutenbergPanel = $( '#try-gutenberg-panel' ),
tryGutenbergPanelHide = $('#wp_try_gutenberg_panel-hide'),
updateTryGutenbergPanel, installGutenbergSuccess;
updateTryGutenbergPanel = function( visible ) {
$.post( ajaxurl, {
action: 'update-try-gutenberg-panel',
visible: visible,
trygutenbergpanelnonce: $( '#trygutenbergpanelnonce' ).val()
});
};
installGutenbergSuccess = function( response ) {
response.activateUrl += '&from=try-gutenberg';
wp.updates.installPluginSuccess( response );
};
if ( tryGutenbergPanel.hasClass('hidden') && tryGutenbergPanelHide.prop('checked') ) {
tryGutenbergPanel.removeClass('hidden');
}
$('.try-gutenberg-panel-close, .try-gutenberg-panel-dismiss a', tryGutenbergPanel).click( function(e) {
e.preventDefault();
tryGutenbergPanel.addClass('hidden');
updateTryGutenbergPanel( 0 );
$('#wp_try_gutenberg_panel-hide').prop('checked', false);
});
tryGutenbergPanelHide.click( function() {
tryGutenbergPanel.toggleClass('hidden', ! this.checked );
updateTryGutenbergPanel( this.checked ? 1 : 0 );
});
tryGutenbergPanel.on( 'click', '.install-now', function( e ) {
e.preventDefault();
var args = {
slug: 'gutenberg',
success: installGutenbergSuccess
};
wp.updates.installPlugin( args );
} );
// These widgets are sometimes populated via ajax
ajaxWidgets = ['dashboard_primary'];

File diff suppressed because one or more lines are too long

View File

@@ -585,18 +585,10 @@
$message
.removeClass( 'updating-message' )
.addClass( 'updated-message installed' )
.addClass( 'updated-message installed button-disabled' )
.attr( 'aria-label', wp.updates.l10n.pluginInstalledLabel.replace( '%s', response.pluginName ) )
.text( wp.updates.l10n.pluginInstalled );
if ( $message.hasClass( 'button-primary' ) ) {
$message.addClass( 'button-primary-disabled' );
} else if ( $message.hasClass( 'button-secondary' ) ) {
$message.addClass( 'button-secondary-disabled' );
} else {
$message.addClass( 'button-disabled' );
}
wp.a11y.speak( wp.updates.l10n.installedMsg, 'polite' );
$document.trigger( 'wp-plugin-install-success', response );
@@ -605,8 +597,7 @@
setTimeout( function() {
// Transform the 'Install' button into an 'Activate' button.
$message.removeClass( 'install-now installed button-primary-disabled button-secondary-disabled button-disabled updated-message' )
.addClass( 'activate-now button-primary' )
$message.removeClass( 'install-now installed button-disabled updated-message' ).addClass( 'activate-now button-primary' )
.attr( 'href', response.activateUrl )
.attr( 'aria-label', wp.updates.l10n.activatePluginLabel.replace( '%s', response.pluginName ) )
.text( wp.updates.l10n.activatePlugin );

File diff suppressed because one or more lines are too long