Make WordPress Core


Ignore:
Timestamp:
08/19/2022 08:58:34 PM (2 years ago)
Author:
joedolson
Message:

Permalinks: Fix aria-live text when removing custom structure.

Change the notification announced when a custom structure is removed. Previously, the notification incorrectly indicated that the structure was added for both actions. This changes the notification to correctly announce removals when structures are removed.

Props joedolson, kebbet, SergeyBiryukov.
Fixes #56230.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-permalink.php

    r53714 r53911  
    310310/* translators: %s: Permalink structure tag. */
    311311$tag_added = __( '%s added to permalink structure' );
    312 
     312/* translators: %s: Permalink structure tag. */
     313$tag_removed = __( '%s removed from permalink structure' );
    313314/* translators: %s: Permalink structure tag. */
    314315$tag_already_used = __( '%s (already used in permalink structure)' );
     
    379380                                        aria-label="<?php echo esc_attr( sprintf( $explanation, $tag ) ); ?>"
    380381                                        data-added="<?php echo esc_attr( sprintf( $tag_added, $tag ) ); ?>"
     382                                        data-removed="<?php echo esc_attr( sprintf( $tag_removed, $tag ) ); ?>"
    381383                                        data-used="<?php echo esc_attr( sprintf( $tag_already_used, $tag ) ); ?>">
    382384                                        <?php echo '%' . $tag . '%'; ?>
Note: See TracChangeset for help on using the changeset viewer.