Skip to content

Commit b5c961c

Browse files
committed
Tidy up has_children() custom function
1 parent 7ce0bf1 commit b5c961c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

CleanBuild/functions/wordpress/wordpress-custom.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,7 @@ function yoasttobottom() {
7474
function has_children() {
7575
global $post;
7676
$children = get_pages( array( 'child_of' => $post->ID ) );
77-
if( count( $children ) == 0 ) {
78-
return false;
79-
} else {
80-
return true;
81-
}
77+
return $children ? true : false;
8278
}
8379

8480
?>

0 commit comments

Comments
 (0)