Changeset 59566
- Timestamp:
- 12/30/2024 09:30:14 AM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r59565 r59566 1136 1136 $post = get_post( $post ); 1137 1137 1138 if ( ! $post || empty( $post->post_parent ) || $post->post_parent == $post->ID ) {1138 if ( ! $post || empty( $post->post_parent ) || $post->post_parent === $post->ID ) { 1139 1139 return array(); 1140 1140 } … … 1147 1147 while ( $ancestor = get_post( $id ) ) { 1148 1148 // Loop detection: If the ancestor has been seen before, break. 1149 if ( empty( $ancestor->post_parent ) || ( $ancestor->post_parent == $post->ID ) || in_array( $ancestor->post_parent, $ancestors, true ) ) { 1149 if ( empty( $ancestor->post_parent ) || $ancestor->post_parent === $post->ID 1150 || in_array( $ancestor->post_parent, $ancestors, true ) 1151 ) { 1150 1152 break; 1151 1153 }
Note: See TracChangeset
for help on using the changeset viewer.