[wp-trac] [WordPress Trac] #65078: get_page_by_title should not be deprecated
WordPress Trac
noreply at wordpress.org
Sat May 2 10:56:05 UTC 2026
#65078: get_page_by_title should not be deprecated
-------------------------------+------------------------------
Reporter: hybridwebdev | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 6.2
Severity: normal | Resolution:
Keywords: close | Focuses:
-------------------------------+------------------------------
Changes (by SirLouen):
* keywords: 2nd-opinion => close
Comment:
> Finally, low level methods like this serve a specific purpose. They're
not intended to catch edge cases. That responsibility is on the code that
uses the method.
These direct methods introduced some flaky issues very hard to maintain as
suggested by @peterwilsoncc back in the day. I cannot see the problem of a
more generalistic solution for this trivial thing.
> Deprecating this function effectively requires developers to reimplement
its logic. This leads to duplicated boilerplate and inconsistent
implementations across codebases.
It's a very trivial implementation, and deprecated things never fade in WP
so you can basically keep using it despite you will get the deprecated
messages in the log.
The deprecation was for good, and many legacy things still need some
degree of deprecation yet, but there isn't much time for devs to go
through all of them.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65078#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list