Make WordPress Core

Ticket #26664: 26664.diff

File 26664.diff, 2.0 KB (added by obenland, 11 years ago)
  • wp-admin/includes/update.php

     
    219219add_action( 'admin_notices', 'update_nag', 3 );
    220220add_action( 'network_admin_notices', 'update_nag', 3 );
    221221
    222 // Called directly from dashboard
    223 function update_right_now_message() {
    224         $msg = sprintf( __( 'You are using <span class="b">WordPress %s</span>.' ), get_bloginfo( 'version', 'display' ) );
    225 
    226         if ( current_user_can('update_core') ) {
    227                 $cur = get_preferred_from_update_core();
    228 
    229                 if ( isset( $cur->response ) && $cur->response == 'upgrade' )
    230                         $msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
    231         }
    232 
    233         echo "<span id='wp-version-message'>$msg</span>";
    234 }
    235 
    236222function get_plugin_updates() {
    237223        $all_plugins = get_plugins();
    238224        $upgrade_plugins = array();
  • wp-admin/includes/deprecated.php

     
    11741174function wp_dashboard_secondary() {}
    11751175function wp_dashboard_secondary_control() {}
    11761176/**#@-*/
     1177
     1178/**
     1179 * This was once called directly from the dashboard.
     1180 *
     1181 * @since 2.5.0
     1182 * @deprecated 3.9.0
     1183 */
     1184function update_right_now_message() {
     1185        _deprecated_function( __FUNCTION__, '3.9' );
     1186
     1187        $msg = sprintf( __( 'You are using <span class="b">WordPress %s</span>.' ), get_bloginfo( 'version', 'display' ) );
     1188
     1189        if ( current_user_can('update_core') ) {
     1190                $cur = get_preferred_from_update_core();
     1191
     1192                if ( isset( $cur->response ) && $cur->response == 'upgrade' )
     1193                        $msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>';
     1194        }
     1195
     1196        echo "<span id='wp-version-message'>$msg</span>";
     1197}