Changeset 52713
- Timestamp:
- 02/11/2022 10:09:35 PM (3 years ago)
- Location:
- branches/5.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.9
-
branches/5.9/src/wp-admin/update-core.php
r52203 r52713 207 207 ) 208 208 ); 209 209 210 if ( $dismissed ) { 210 211 211 $show_text = esc_js( __( 'Show hidden updates' ) ); 212 212 $hide_text = esc_js( __( 'Hide hidden updates' ) ); 213 213 ?> 214 <script type="text/javascript"> 215 jQuery(function( $ ) { 216 $( 'dismissed-updates' ).show(); 217 $( '#show-dismissed' ).toggle( function() { $( this ).text( '<?php echo $hide_text; ?>' ).attr( 'aria-expanded', 'true' ); }, function() { $( this ).text( '<?php echo $show_text; ?>' ).attr( 'aria-expanded', 'false' ); } ); 218 $( '#show-dismissed' ).click( function() { $( '#dismissed-updates' ).toggle( 'fast' ); } ); 219 }); 220 </script> 214 <script type="text/javascript"> 215 jQuery( function( $ ) { 216 $( '#show-dismissed' ).on( 'click', function() { 217 var isExpanded = ( 'true' === $( this ).attr( 'aria-expanded' ) ); 218 219 if ( isExpanded ) { 220 $( this ).text( '<?php echo $show_text; ?>' ).attr( 'aria-expanded', 'false' ); 221 } else { 222 $( this ).text( '<?php echo $hide_text; ?>' ).attr( 'aria-expanded', 'true' ); 223 } 224 225 $( '#dismissed-updates' ).toggle( 'fast' ); 226 }); 227 }); 228 </script> 221 229 <?php 222 230 echo '<p class="hide-if-no-js"><button type="button" class="button" id="show-dismissed" aria-expanded="false">' . __( 'Show hidden updates' ) . '</button></p>';
Note: See TracChangeset
for help on using the changeset viewer.