Jonny Harris 4ca85e7528 Query: Use WP_Query in get_page_by_path.
Replace raw database queries in `get_page_by_path` with a call to `WP_Query` class. This has a number of benefits, including improved caching and priming of post caches. To maintain backwards compatibility, this function calls `WP_Query` to gets all matching posts of all post statuses.  

Props spacedmonkey, peterwilsoncc, costdev, 
Fixes #56689.

git-svn-id: https://develop.svn.wordpress.org/trunk@55169 602fd350-edb4-49c9-b593-d223f7449a82
2023-01-31 16:54:22 +00:00
..