# dismissed_updates()

URL: https://chugunov.pro/api-wordpress/functions/dismissed_updates/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 2.7.0.

## Сигнатура

```php
dismissed_updates()
```

## Описание

Показывает отклонённые обновления.

## Исходный код

Файл: `wp-admin/update-core.php:201`

```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>';
	}
}
```

## История изменений

- 2.7.0 — Introduced.

## Связанные

Использует: [`get_core_updates`](https://chugunov.pro/api-wordpress/functions/get_core_updates/), [`list_core_update`](https://chugunov.pro/api-wordpress/functions/list_core_update/), [`esc_js`](https://chugunov.pro/api-wordpress/functions/esc_js/), [`__`](https://chugunov.pro/api-wordpress/functions/__/).
Используется в: [`core_upgrade_preamble`](https://chugunov.pro/api-wordpress/functions/core_upgrade_preamble/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/dismissed_updates/
