Skip to content

Commit

Permalink
Merge pull request #135 from Automattic/fix/remove-vip-get-page-by-path
Browse files Browse the repository at this point in the history
Remove wpcom_vip_get_page_by_path
  • Loading branch information
GaryJones authored Sep 17, 2024
2 parents eeb5536 + f4fdfcd commit 69a7634
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions includes/class-wpcom-legacy-redirector.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,8 @@ public static function check_if_404( $url ) {
*/
public static function vip_legacy_redirect_check_if_public( $excerpt ) {
$post_types = get_post_types();
$post_obj = get_page_by_path( $excerpt, OBJECT, $post_types );

if ( function_exists( 'wpcom_vip_get_page_by_path' ) ) {
$post_obj = wpcom_vip_get_page_by_path( $excerpt, OBJECT, $post_types );
} else {
$post_obj = get_page_by_path( $excerpt, OBJECT, $post_types );
}
if ( ! is_null( $post_obj ) ) {
if ( 'publish' !== get_post_status( $post_obj->ID ) ) {
return 'private';
Expand Down

0 comments on commit 69a7634

Please sign in to comment.