undismiss_core_update

The WordPress Core undismiss core update function.

Description

undismiss_core_update( (string) $version, (string) $locale ); 

Parameters (2)

0. $version (string)
The version.
1. $locale (string)
The locale.

Usage

  1. if ( !function_exists( 'undismiss_core_update' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/update.php'; 
  3.  
  4. // The version. 
  5. $version = ''; 
  6.  
  7. // The locale. 
  8. $locale = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = undismiss_core_update($version, $locale); 
  12.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/update.php  
  1. function undismiss_core_update( $version, $locale ) { 
  2. $dismissed = get_site_option( 'dismissed_update_core' ); 
  3. $key = $version . '|' . $locale; 
  4.  
  5. if ( ! isset( $dismissed[$key] ) ) 
  6. return false; 
  7.  
  8. unset( $dismissed[$key] ); 
  9. return update_site_option( 'dismissed_update_core', $dismissed );