Skip to content

Commit

Permalink
Merge pull request #817 from Automattic/deprecate/get_page_by_path
Browse files Browse the repository at this point in the history
Deprecate suggesting using wpcom_vip_get_page_by_path
  • Loading branch information
GaryJones authored Apr 15, 2024
2 parents 8687674 + ab56662 commit 7d3768c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,6 @@ public function getGroups() {
'create_function',
],
],
'get_page_by_path' => [
'type' => 'warning',
'message' => '%s() is highly discouraged due to not being cached; please use wpcom_vip_get_page_by_path() instead.',
'functions' => [
'get_page_by_path',
],
],
];

$deprecated_vip_helpers = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ $wp_random_testing = create_function3( '$a, $b', 'return ( $b / $a ); '); // Ok.



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



$popular = stats_get_csv( 'postviews', [ 'days' => 2, 'limit' => 20 ] ); // Error.
$popular = custom_stats_get_csv( 'postviews', [ 'days' => 2, 'limit' => 20 ] ); // Ok.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ public function getWarningList() {
138 => 1,
139 => 1,
208 => 1,
226 => 1,
];
}
}

0 comments on commit 7d3768c

Please sign in to comment.