Skip to content

Commit

Permalink
Fix getter
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Oct 19, 2022
1 parent 7ff66ba commit 15dbfb7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wp-includes/class-wp-block-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ public function __get( $name ) {
}

$new_name = $name . '_handles';

if ( count( $this->{$new_name} ) > 1 ) {
return $this->{$new_name};
}
return isset( $this->{$new_name}[0] ) ? $this->{$new_name}[0] : null;
}

Expand Down

0 comments on commit 15dbfb7

Please sign in to comment.