Make WordPress Core

Changeset 57595

Timestamp:
02/12/2024 03:24:02 PM (6 months ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/misc.php

    r57572 r57595  
    13971397    $current_url  = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
    13981398    $filtered_url = remove_query_arg( $removable_query_args, $current_url );
     1399
     1400
     1401
     1402
     1403
     1404
     1405
     1406
     1407
    13991408    ?>
    14001409    <link id="wp-admin-canonical" rel="canonical" href="<?php echo esc_url( $filtered_url ); ?>" />
Note: See TracChangeset for help on using the changeset viewer.