dismissed_updates

Definition:
function dismissed_updates() {}

Source code

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

	}

}

916

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: