Accessibility: Widgets: Add a "Cancel" link when editing a widget in accessibility mode.
This allows the user to go back without saving any changes to the widget. Props garrett-eclipse, audrasjb, afercia. Fixes #49354. Built from https://develop.svn.wordpress.org/trunk@49113 git-svn-id: http://core.svn.wordpress.org/trunk@48875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7a622f6ffd
commit
c628344422
|
@ -294,8 +294,7 @@ function wp_widget_control( $sidebar_args ) {
|
||||||
<div class="alignleft">
|
<div class="alignleft">
|
||||||
<button type="button" class="button-link button-link-delete widget-control-remove"><?php _e( 'Delete' ); ?></button>
|
<button type="button" class="button-link button-link-delete widget-control-remove"><?php _e( 'Delete' ); ?></button>
|
||||||
<span class="widget-control-close-wrapper">
|
<span class="widget-control-close-wrapper">
|
||||||
|
|
| <button type="button" class="button-link widget-control-close"><?php _e( 'Done' ); ?></button>
|
||||||
<button type="button" class="button-link widget-control-close"><?php _e( 'Done' ); ?></button>
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="alignright<?php echo $noform_class; ?>">
|
<div class="alignright<?php echo $noform_class; ?>">
|
||||||
|
|
|
@ -346,22 +346,26 @@ if ( isset( $_GET['editwidget'] ) && $_GET['editwidget'] ) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="widget-control-actions">
|
<div class="widget-control-actions">
|
||||||
<?php
|
<div class="alignleft">
|
||||||
if ( isset( $_GET['addnew'] ) ) {
|
<?php if ( ! isset( $_GET['addnew'] ) ) : ?>
|
||||||
?>
|
<input type="submit" name="removewidget" id="removewidget" class="button-link button-link-delete widget-control-remove" value="<?php _e( 'Delete' ); ?>" />
|
||||||
<a href="widgets.php" class="button alignleft"><?php _e( 'Cancel' ); ?></a>
|
<span class="widget-control-close-wrapper">
|
||||||
<?php
|
| <a href="widgets.php" class="button-link widget-control-close"><?php _e( 'Cancel' ); ?></a>
|
||||||
} else {
|
</span>
|
||||||
submit_button( __( 'Delete' ), 'alignleft', 'removewidget', false );
|
<?php else : ?>
|
||||||
}
|
<a href="widgets.php" class="button-link widget-control-close"><?php _e( 'Cancel' ); ?></a>
|
||||||
submit_button( __( 'Save Widget' ), 'primary alignright', 'savewidget', false );
|
<?php endif; ?>
|
||||||
?>
|
</div>
|
||||||
<input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr( $widget_id ); ?>" />
|
<div class="alignright">
|
||||||
<input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr( $id_base ); ?>" />
|
<?php submit_button( __( 'Save Widget' ), 'primary alignright', 'savewidget', false ); ?>
|
||||||
<input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr( $multi_number ); ?>" />
|
<input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr( $widget_id ); ?>" />
|
||||||
<?php wp_nonce_field( "save-delete-widget-$widget_id" ); ?>
|
<input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr( $id_base ); ?>" />
|
||||||
<br class="clear" />
|
<input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr( $multi_number ); ?>" />
|
||||||
|
<?php wp_nonce_field( "save-delete-widget-$widget_id" ); ?>
|
||||||
|
</div>
|
||||||
|
<br class="clear" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.6-alpha-49112';
|
$wp_version = '5.6-alpha-49113';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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