Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #43857, comment 84


Ignore:
Timestamp:
01/19/2019 12:37:13 PM (5 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #43857, comment 84

    v1 v2  
    5543857.8.diff looks a lot better. The only thing remaining would be to remove use of comment cookies for this functionality completely, consent or no consent.
    66
    7 Also, to avoid dealing with canonical URLs it may be possible to use the hash part of the URL when redirecting. The (redirect) URL hash would look something like `https://site.tld/post-with-comments/#comment-1234_abcd1234` where `abcd1234` would be the WP hash allowing the user to see their unapproved comment. Then we can use `window.history.replaceState()` to remove the `_abcd1234` part.
     7Also, to avoid dealing with canonical URLs it may be possible to use the hash part of the URL when redirecting. Then the (redirect) URL would look something like `https://site.tld/post-with-comments/#comment-1234_abcd1234` where `abcd1234` would be the WP hash allowing the user to see their unapproved comment. Then we can use `window.history.replaceState()` to remove the `_abcd1234` part.
    88
    99As far as I see this should work, the browser will scroll to the location of the comment, if that script runs in the head. Will test a bit more.