core_update_footer() WordPress Function
The core_update_footer() function enables you to update the footer text in the WordPress admin area. This function accepts two arguments: the new footer text (string) and whether to replace the old footer text (bool). If you are updating the footer text, it is recommended that you set the second argument to true so that the old footer text is replaced. If you set the second argument to false, the new footer text will be appended to the existing footer text.
core_update_footer( string $msg = '' ) #
Parameters
- $msg
(string)(Optional)
Default value: ''
Return
(string)
Source
File: wp-admin/includes/update.php
function core_update_footer( $msg = '' ) { if ( ! current_user_can( 'update_core' ) ) { /* translators: %s: WordPress version. */ return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) ); } $cur = get_preferred_from_update_core(); if ( ! is_object( $cur ) ) { $cur = new stdClass; } if ( ! isset( $cur->current ) ) { $cur->current = ''; } if ( ! isset( $cur->response ) ) { $cur->response = ''; } // Include an unmodified $wp_version. require ABSPATH . WPINC . '/version.php'; $is_development_version = preg_match( '/alpha|beta|RC/', $wp_version ); if ( $is_development_version ) { return sprintf( /* translators: 1: WordPress version number, 2: URL to WordPress Updates screen. */ __( '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' ) ); } switch ( $cur->response ) { case 'upgrade': return sprintf( '<strong><a href="%s">%s</a></strong>', network_admin_url( 'update-core.php' ), /* translators: %s: WordPress version. */ sprintf( __( 'Get Version %s' ), $cur->current ) ); case 'latest': default: /* translators: %s: WordPress version. */ return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) ); } }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.3.0 | Introduced. |