Skip to content

Commit

Permalink
Deprecate suggesting using wpcom_vip_get_page_by_path
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahum committed Apr 8, 2024
1 parent 8687674 commit ab56662
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 ab56662

Please sign in to comment.