Make WordPress Core

Changeset 21704


Ignore:
Timestamp:
09/03/2012 10:01:55 PM (13 years ago)
Author:
nacin
Message:

Don't call self_admin_url() or esc_url() when declaring that WordPress updated successfully, as they may not exist in the current (just updated) version.

props SergeyBiryukov.
see #21511.
for the 3.4 branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.4/wp-admin/includes/update-core.php

    r21151 r21704  
    696696    // See do_core_upgrade()
    697697    show_message( __('WordPress updated successfully') );
    698     show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%s">here</a>.' ), $new_version, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '</span>' );
    699     show_message( '<span class="hide-if-js">' . sprintf( __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), $new_version, esc_url( self_admin_url( 'about.php?updated' ) ) ) . '</span>' );
     698
     699    // self_admin_url() won't exist when upgrading from <= 3.0, so relative URLs are intentional.
     700    show_message( '<span class="hide-if-no-js">' . sprintf( __( 'Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%s">here</a>.' ), $new_version, 'about.php?updated' ) . '</span>' );
     701    show_message( '<span class="hide-if-js">' . sprintf( __( 'Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.' ), $new_version, 'about.php?updated' ) . '</span>' );
    700702    echo '</div>';
    701703    ?>
    702704<script type="text/javascript">
    703 window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
     705window.location = 'about.php?updated';
    704706</script>
    705707    <?php
Note: See TracChangeset for help on using the changeset viewer.