Make WordPress Core

Changeset 21702


Ignore:
Timestamp:
09/03/2012 09:56:12 PM (12 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 trunk.

File:
1 edited

Legend:

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

    r21660 r21702  
    836836    // See do_core_upgrade()
    837837    show_message( __('WordPress updated successfully') );
    838     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>' );
    839     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>' );
     838
     839    // self_admin_url() won't exist when upgrading from <= 3.0, so relative URLs are intentional.
     840    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>' );
     841    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>' );
    840842    echo '</div>';
    841843    ?>
    842844<script type="text/javascript">
    843 window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
     845window.location = 'about.php?updated';
    844846</script>
    845847    <?php
Note: See TracChangeset for help on using the changeset viewer.