Skip to content

Commit f087d21

Browse files
committed
Deprecate suggesting using wpcom_vip_get_page_by_path
1 parent 8687674 commit f087d21

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

Diff for: WordPressVIPMinimum/Sniffs/Functions/RestrictedFunctionsSniff.php

-7
Original file line numberDiff line numberDiff line change
@@ -269,13 +269,6 @@ public function getGroups() {
269269
'create_function',
270270
],
271271
],
272-
'get_page_by_path' => [
273-
'type' => 'warning',
274-
'message' => '%s() is highly discouraged due to not being cached; please use wpcom_vip_get_page_by_path() instead.',
275-
'functions' => [
276-
'get_page_by_path',
277-
],
278-
],
279272
];
280273

281274
$deprecated_vip_helpers = [

Diff for: WordPressVIPMinimum/Tests/Functions/RestrictedFunctionsUnitTest.inc

+2-2
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ $wp_random_testing = create_function3( '$a, $b', 'return ( $b / $a ); '); // Ok.
222222

223223

224224

225-
wpcom_vip_get_page_by_path(); // Ok - VIP recommended version of get_page_by_path().
226-
get_page_by_path( $page_path ); // Warning.
225+
226+
227227

228228
$popular = stats_get_csv( 'postviews', [ 'days' => 2, 'limit' => 20 ] ); // Error.
229229
$popular = custom_stats_get_csv( 'postviews', [ 'days' => 2, 'limit' => 20 ] ); // Ok.

0 commit comments

Comments
 (0)