When altering the admin URL to reflect the canonical location, keep the existing hash (if present) in the URL.

Fixes #31758. See #23367


git-svn-id: https://develop.svn.wordpress.org/trunk@31882 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2015-03-25 04:31:21 +00:00
parent 76eee7be6a
commit b179fe8e95
1 changed files with 1 additions and 1 deletions

View File

@ -880,7 +880,7 @@ function wp_admin_canonical_url() {
<link id="wp-admin-canonical" rel="canonical" href="<?php echo esc_url( $filtered_url ); ?>" />
<script>
if ( window.history.replaceState ) {
window.history.replaceState( null, null, document.getElementById( 'wp-admin-canonical' ).href );
window.history.replaceState( null, null, document.getElementById( 'wp-admin-canonical' ).href + window.location.hash );
}
</script>
<?php