Canonical: Introduce `admin_canonical_url` filter.
This changeset introduces the new `admin_canonical_url` hook to help developers and extenders to modify the admin canonical url value. Props prionkor, audrasjb. Fixes #59545. Built from https://develop.svn.wordpress.org/trunk@57595 git-svn-id: http://core.svn.wordpress.org/trunk@57096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c193c9936b
commit
d3d9374e06
|
@ -1396,6 +1396,15 @@ function wp_admin_canonical_url() {
|
|||
// Ensure we're using an absolute URL.
|
||||
$current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
|
||||
$filtered_url = remove_query_arg( $removable_query_args, $current_url );
|
||||
|
||||
/**
|
||||
* Filters the admin canonical url value.
|
||||
*
|
||||
* @since 6.5.0
|
||||
*
|
||||
* @param string $filtered_url The admin canonical url value.
|
||||
*/
|
||||
$filtered_url = apply_filters( 'admin_canonical_url', $filtered_url );
|
||||
?>
|
||||
<link id="wp-admin-canonical" rel="canonical" href="<?php echo esc_url( $filtered_url ); ?>" />
|
||||
<script>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.5-alpha-57594';
|
||||
$wp_version = '6.5-alpha-57595';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue