#36928 closed defect (bug) (wontfix)
GUID prepended with http://
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.5.2 |
Component: | Feeds | Keywords: | |
Focuses: | Cc: |
Description
I noticed that when I update/save a post with a non-url guid, that wordpress prepends http:// to the front of the guid. However, I have not found a mechanism for changing this behavior. When found ticket #31080 I hoped that would fix the issue. I am also confused since reading the docs it says nothing about the guid needing to be a url.
I tried the the suggested snippet of code with slight variations to no avail.
remove_filter( 'the_guid', 'esc_url' ); function escape_the_guid($guid){ //tried other things before returning. return $guid; } add_filter( 'the_guid', 'escape_the_guid' );
Lastly, why is there not a unique constraint on the guid column?
Change History (3)
Note: See
TracTickets for help on using
tickets.
You might be looking at unhooking
esc_url_raw
on thepre_post_guid
filter as well. There's alsopost_guid
for display in certain contexts. You can find several default filters with guids included inwp-includes/default-filters.php
.