core_update_footer

The WordPress Core core update footer function.

Description

(string) core_update_footer( (string) $msg = '' ); 

Returns (string)

Parameters (1)

0. $msg — Optional. (string) => ''
The msg.

Usage

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

Defined (1)

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

/wp-admin/includes/update.php  
  1. function core_update_footer( $msg = '' ) { 
  2. if ( !current_user_can('update_core') ) 
  3. return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) ); 
  4.  
  5. if ( ! is_object( $cur ) ) 
  6. $cur = new stdClass; 
  7.  
  8. if ( ! isset( $cur->current ) ) 
  9. $cur->current = ''; 
  10.  
  11. if ( ! isset( $cur->url ) ) 
  12. $cur->url = ''; 
  13.  
  14. if ( ! isset( $cur->response ) ) 
  15. $cur->response = ''; 
  16.  
  17. switch ( $cur->response ) { 
  18. case 'development' : 
  19. /** translators: 1: WordPress version number, 2: WordPress updates admin screen URL */ 
  20. return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), get_bloginfo( 'version', 'display' ), network_admin_url( 'update-core.php' ) ); 
  21.  
  22. case 'upgrade' : 
  23. return '<strong><a href="' . network_admin_url( 'update-core.php' ) . '">' . sprintf( __( 'Get Version %s' ), $cur->current ) . '</a></strong>'; 
  24.  
  25. case 'latest' : 
  26. default : 
  27. return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) );