do_dismiss_core_update() WordPress Function

The do_dismiss_core_update() function is used to dismiss a core update notification. When called, the function will remove the update message from the WordPress admin interface. This is useful for when a user has already updated their WordPress installation and they do not want to be bothered with the update message anymore.

do_dismiss_core_update() #

Dismiss a core update.


Source

File: wp-admin/update-core.php

function do_dismiss_core_update() {
	$version = isset( $_POST['version'] ) ? $_POST['version'] : false;
	$locale  = isset( $_POST['locale'] ) ? $_POST['locale'] : 'en_US';
	$update  = find_core_update( $version, $locale );
	if ( ! $update ) {
		return;
	}
	dismiss_core_update( $update );
	wp_redirect( wp_nonce_url( 'update-core.php?action=upgrade-core', 'upgrade-core' ) );
	exit;
}


Top ↑

Changelog

Changelog
VersionDescription
2.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.