[wp-trac] [WordPress Trac] #44595: wp_insert_post() inserts wrong GUID (adds http:// prefix)
WordPress Trac
noreply at wordpress.org
Tue Jul 17 19:36:41 UTC 2018
#44595: wp_insert_post() inserts wrong GUID (adds http:// prefix)
--------------------------+------------------------------
Reporter: Looimaster | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses:
--------------------------+------------------------------
Comment (by JPry):
@Looimaster One option for your case is to just remove the `esc_url_raw()`
function from the `pre_post_guid` filter:
{{{#!php
remove_filter( 'pre_post_guid', 'esc_url_raw' );
}}}
That would allow you to use any GUID you want without the `http://` being
prepended.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44595#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list