- 2.0.0: Rewritten. The address bar is now set to a URL built in PHP: the page’s canonical URL (core’s on single posts and pages, BuddyPress’s on BuddyPress pages, or any URL supplied through the new lh_canonicaliser_canonical_url filter) plus the preserved query strings from the current request, so search terms, login redirects, comment moderation and reply links, previews, nonces and password reset links are no longer stripped. Preserved keys are filterable with lh_canonicaliser_preserved_query_vars, and their values with lh_canonicaliser_preserved_args. The script now loads on wp_enqueue_scripts, deferred in the footer, so it works with block themes as well as classic ones. It skips non-GET requests, embeds, previews and the Customizer, ignores a canonical URL on another origin, keeps the URL fragment and any existing history state, and no longer logs to the console. Removed the bundled LH_Register_file_class, the unused redirect_canonical() call made on every request, and the lh_canonicaliser_return_white_listed_get_variables filter. Requires WordPress 6.3 and PHP 7.4.
- 1.00: Initial release: replaces the address bar URL with the page’s canonical URL using the History API.
Changelog
If you like this plugin please consider making a donation to further development