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:
parent
76eee7be6a
commit
b179fe8e95
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user