diff --git a/src/wp-admin/about.php b/src/wp-admin/about.php
index 22ec200fa0..a3c9e94fe0 100644
a
|
b
|
include( ABSPATH . 'wp-admin/admin-header.php' ); |
335 | 335 | <p><?php _e( 'Note to users of assistive technology: if you experience usability issues with the block editor, we recommend you continue to use the Classic Editor.' ); ?></p> |
336 | 336 | <?php if ( current_user_can( 'install_plugins' ) ) { ?> |
337 | 337 | <div class="col cta"> |
338 | | <a class="button button-primary button-hero" href="<?php echo esc_url( wp_nonce_url( self_admin_url( 'plugin-install.php?tab=favorites&user=wordpressdotorg' ), 'save_wporg_username_' . get_current_user_id() ) ); ?>"><?php _e( 'Install the Classic Editor' ); ?></a> |
| 338 | <a class="button button-primary button-hero" href="<?php echo esc_url( wp_nonce_url( self_admin_url( 'plugin-install.php?tab=favorites&user=wordpressdotorg&save=0' ), 'save_wporg_username_' . get_current_user_id() ) ); ?>"><?php _e( 'Install the Classic Editor' ); ?></a> |
339 | 339 | </div> |
340 | 340 | <?php } ?> |
341 | 341 | </div> |
diff --git a/src/wp-admin/includes/class-wp-plugin-install-list-table.php b/src/wp-admin/includes/class-wp-plugin-install-list-table.php
index 9bcf652f61..efcbfab480 100644
a
|
b
|
class WP_Plugin_Install_List_Table extends WP_List_Table { |
190 | 190 | $action = 'save_wporg_username_' . get_current_user_id(); |
191 | 191 | if ( isset( $_GET['_wpnonce'] ) && wp_verify_nonce( wp_unslash( $_GET['_wpnonce'] ), $action ) ) { |
192 | 192 | $user = isset( $_GET['user'] ) ? wp_unslash( $_GET['user'] ) : get_user_option( 'wporg_favorites' ); |
193 | | update_user_meta( get_current_user_id(), 'wporg_favorites', $user ); |
| 193 | |
| 194 | // If the save url parameter is passed with a falsey value, don't save the favorite user. |
| 195 | if ( ! isset( $_GET['save'] ) || $_GET['save'] ) { |
| 196 | update_user_meta( get_current_user_id(), 'wporg_favorites', $user ); |
| 197 | } |
194 | 198 | } else { |
195 | 199 | $user = get_user_option( 'wporg_favorites' ); |
196 | 200 | } |