[wp-trac] [WordPress Trac] #36465: Implement get_content_id_by_slug() function
WordPress Trac
noreply at wordpress.org
Thu Feb 2 12:05:01 UTC 2017
#36465: Implement get_content_id_by_slug() function
-------------------------------+---------------------------------------
Reporter: eclare | Owner:
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Posts, Post Types | Version:
Severity: normal | Resolution: wontfix
Keywords: | Focuses: administration, template
-------------------------------+---------------------------------------
Changes (by swissspidy):
* status: new => closed
* resolution: => wontfix
* milestone: Awaiting Review =>
Comment:
`get_page_by_path()` returns the post object or null on failure. The
function in the gist uses `get_page_by_path()` to return the post ID or
null on failure. That's not really an improvement as you'd still have to
check against null in your code.
I'm closing this since `get_page_by_path()` works just fine and there's
been no activity in almost a year.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36465#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list