Skip to content

Commit

Permalink
Cleaning up code
Browse files Browse the repository at this point in the history
  • Loading branch information
xDehy committed Jul 23, 2024
1 parent 26ce4c7 commit 642c02a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions class-simple-page-ordering.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,10 @@ public static function page_row_actions( $actions, $post ) {

// Get the relevant siblings.
if ( 0 === $post->post_parent ) {
$siblings = $top_level_pages;
} else {
if (isset($children_pages[$post->post_parent])) {
$siblings = $children_pages[$post->post_parent];
} else {
$siblings = [];
}
}
$siblings = $top_level_pages;
} else {
$siblings = $children_pages[ $post->post_parent ] ?? [];
}

// Assume no sibling.
$sibling = 0;
Expand Down

0 comments on commit 642c02a

Please sign in to comment.