A WordPress-centric search engine for devs and theme authors



dismissed_updates ›

Since2.7.0
Deprecatedn/a
dismissed_updates ( No parameters )
Defined at:
Codex:

No description yet.



Source

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 type="text/javascript">

		jQuery(function($) {
			$('dismissed-updates').show();
			$('#show-dismissed').toggle(function(){$(this).text('<?php echo $hide_text; ?>');}, function() {$(this).text('<?php echo $show_text; ?>')});
			$('#show-dismissed').click(function() { $('#dismissed-updates').toggle('slow');});
		});
	</script>
	<?php
		echo '<p class="hide-if-no-js"><a id="show-dismissed" href="#">' . __( 'Show hidden updates' ) . '</a></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>';
	}
}