Ticket #56230: 56230.3.diff
File 56230.3.diff, 2.0 KB (added by , 2 years ago) |
---|
-
src/js/_enqueues/admin/common.js
751 751 selectionStart = $permalinkStructure[ 0 ].selectionStart, 752 752 selectionEnd = $permalinkStructure[ 0 ].selectionEnd, 753 753 textToAppend = $( this ).text().trim(), 754 textToAnnounce = $( this ).attr( 'data-added' ),754 textToAnnounce, 755 755 newSelectionStart; 756 756 757 if ( $( this ).hasClass( 'active' ) ) { 758 textToAnnounce = $( this ).attr( 'data-removed' ); 759 } else { 760 textToAnnounce = $( this ).attr( 'data-added' ); 761 } 762 757 763 // Remove structure tag if already part of the structure. 758 764 if ( -1 !== permalinkStructureValue.indexOf( textToAppend ) ) { 759 765 permalinkStructureValue = permalinkStructureValue.replace( textToAppend + '/', '' ); -
src/wp-admin/options-permalink.php
309 309 310 310 /* translators: %s: Permalink structure tag. */ 311 311 $tag_added = __( '%s added to permalink structure' ); 312 313 312 /* translators: %s: Permalink structure tag. */ 313 $tag_removed = __( '%s removed from permalink structure' ); 314 /* translators: %s: Permalink structure tag. */ 314 315 $tag_already_used = __( '%s (already used in permalink structure)' ); 315 316 ?> 316 317 <h2 class="title"><?php _e( 'Common Settings' ); ?></h2> … … 378 379 class="button button-secondary" 379 380 aria-label="<?php echo esc_attr( sprintf( $explanation, $tag ) ); ?>" 380 381 data-added="<?php echo esc_attr( sprintf( $tag_added, $tag ) ); ?>" 382 data-removed="<?php echo esc_attr( sprintf( $tag_removed, $tag ) ); ?>" 381 383 data-used="<?php echo esc_attr( sprintf( $tag_already_used, $tag ) ); ?>"> 382 384 <?php echo '%' . $tag . '%'; ?> 383 385 </button>