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.



git-svn-id: https://develop.svn.wordpress.org/trunk@21702 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-09-03 21:56:12 +00:00
parent 909cbd75b8
commit 4769e9e656
1 changed files with 5 additions and 3 deletions

View File

@ -835,12 +835,14 @@ function _redirect_to_about_wordpress( $new_version ) {
// See do_core_upgrade()
show_message( __('WordPress updated successfully') );
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>' );
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>' );
// self_admin_url() won't exist when upgrading from <= 3.0, so relative URLs are intentional.
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>' );
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>' );
echo '</div>';
?>
<script type="text/javascript">
window.location = '<?php echo self_admin_url( 'about.php?updated' ); ?>';
window.location = 'about.php?updated';
</script>
<?php