Title: dismissed_updates
Published: April 25, 2014
Last modified: May 20, 2026

---

# dismissed_updates()

## In this article

 * [Source](https://developer.wordpress.org/reference/functions/dismissed_updates/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/dismissed_updates/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/dismissed_updates/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/dismissed_updates/?output_format=md#wp--skip-link--target)

Display dismissed updates.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/dismissed_updates/?output_format=md#source)󠁿

    ```php
    function dismissed_updates() {
    	$dismissed = get_core_updates(
    		array(
    			'dismissed' => true,
    			'available' => false,
    		)
    	);

    	if ( $dismissed ) {
    		$show_text = esc_js( __( 'Show hidden updates' ) );
    		$hide_text = esc_js( __( 'Hide hidden updates' ) );
    		?>
    		<script>
    			jQuery( function( $ ) {
    				$( '#show-dismissed' ).on( 'click', function() {
    					var isExpanded = ( 'true' === $( this ).attr( 'aria-expanded' ) );

    					if ( isExpanded ) {
    						$( this ).text( '<?php echo $show_text; ?>' ).attr( 'aria-expanded', 'false' );
    					} else {
    						$( this ).text( '<?php echo $hide_text; ?>' ).attr( 'aria-expanded', 'true' );
    					}

    					$( '#dismissed-updates' ).toggle( 'fast' );
    				});
    			});
    		</script>
    		<?php
    		echo '<p class="hide-if-no-js"><button type="button" class="button" id="show-dismissed" aria-expanded="false">' . __( 'Show hidden updates' ) . '</button></p>';
    		echo '<ul id="dismissed-updates" class="core-updates dismissed">';
    		foreach ( (array) $dismissed as $update ) {
    			echo '<li>';
    			list_core_update( $update );
    			echo '</li>';
    		}
    		echo '</ul>';
    	}
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/update-core.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/update-core.php#L201)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/update-core.php#L201-L238)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/dismissed_updates/?output_format=md#related)󠁿

| Uses | Description | 
| [get_core_updates()](https://developer.wordpress.org/reference/functions/get_core_updates/)`wp-admin/includes/update.php` |

Gets available core updates.

  | 
| [list_core_update()](https://developer.wordpress.org/reference/functions/list_core_update/)`wp-admin/update-core.php` |

Lists available core updates.

  | 
| [esc_js()](https://developer.wordpress.org/reference/functions/esc_js/)`wp-includes/formatting.php` |

Escapes single quotes, `"`, , `&amp;`, and fixes line endings.

  | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/dismissed_updates/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/dismissed_updates/?output_format=md#)

| Used by | Description | 
| [core_upgrade_preamble()](https://developer.wordpress.org/reference/functions/core_upgrade_preamble/)`wp-admin/update-core.php` |

Display upgrade WordPress for downloading latest or upgrading automatically form.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/dismissed_updates/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.7.0](https://developer.wordpress.org/reference/since/2.7.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fdismissed_updates%2F)
before being able to contribute a note or feedback.