undismiss_core_update() WordPress Function

The undismiss_core_update() function is used to re-enable a dismissed WordPress core update. This function takes no parameters.

undismiss_core_update( string $version, string $locale ) #

Undismisses core update.


Parameters

$version

(string)(Required)

$locale

(string)(Required)


Top ↑

Return

(bool)


Top ↑

Source

File: wp-admin/includes/update.php

function undismiss_core_update( $version, $locale ) {
	$dismissed = get_site_option( 'dismissed_update_core' );
	$key       = $version . '|' . $locale;

	if ( ! isset( $dismissed[ $key ] ) ) {
		return false;
	}

	unset( $dismissed[ $key ] );
	return update_site_option( 'dismissed_update_core', $dismissed );
}


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.