dismissed_updates

The WordPress Core dismissed updates function.

Description

dismissed_updates(); 

Usage

  1. if ( !function_exists( 'dismissed_updates' ) ) { 
  2. require_once ABSPATH . '/wp-admin/update-core.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = dismissed_updates(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/update-core.php  
  1. function dismissed_updates() { 
  2. $dismissed = get_core_updates( array( 'dismissed' => true, 'available' => false ) ); 
  3. if ( $dismissed ) { 
  4.  
  5. $show_text = esc_js(__('Show hidden updates')); 
  6. $hide_text = esc_js(__('Hide hidden updates')); 
  7. ?> 
  8. <script type="text/javascript"> 
  9.  
  10. jQuery(function($) { 
  11. $('dismissed-updates').show(); 
  12. $('#show-dismissed').toggle(function() {$(this).text('<?php echo $hide_text; ?>');}, function() {$(this).text('<?php echo $show_text; ?>')}); 
  13. $('#show-dismissed').click(function() { $('#dismissed-updates').toggle('slow');}); 
  14. }); 
  15. </script> 
  16. <?php 
  17. echo '<p class="hide-if-no-js"><a id="show-dismissed" href="#">'.__('Show hidden updates').'</a></p>'; 
  18. echo '<ul id="dismissed-updates" class="core-updates dismissed">'; 
  19. foreach ( (array) $dismissed as $update) { 
  20. echo '<li>'; 
  21. list_core_update( $update ); 
  22. echo '</li>'; 
  23. echo '</ul>';