mirror of
git://develop.git.wordpress.org/
synced 2025-02-23 16:15:31 +01:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@57595 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
cb522a3b25
commit
ad25a79755
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user