Automattic / VIP-Coding-Standards

PHP_CodeSniffer ruleset to enforce WordPress VIP coding standards.
https://wpvip.com/documentation/how-to-install-php-code-sniffer-for-wordpress-com-vip/
Other
236 stars 40 forks source link

End restricting usage of get_page_by_title() #814

Closed GaryJones closed 7 months ago

GaryJones commented 7 months ago

In WP 6.1.0, get_page_by_title() was changed to use WP_Query internally`. See core.trac.wordpress.org/ticket/36905. This means that reporting this function as not being cached is not true anymore.

Note that since WP 6.2.0, the function was reverted from using WP_Query but was deprecated in favour of using WP_Query directly. WordPress Coding Standards highlights this deprecation already.

See #801 and specifically this comment.