Skip to content

Commit

Permalink
Fix return type for label filter
Browse files Browse the repository at this point in the history
  • Loading branch information
gchtr committed Oct 12, 2022
1 parent fc2d868 commit 19cd00b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 2.5.6 - 2022-10-12

- Fixed return type for label filter.
- Fixed bugs when trying to access column data on columns that are not arrays (e.g. when column is set to `false`).
- Improved default compatibility with custom permalink structure when using the `page_for_archive` option.

Expand Down
2 changes: 1 addition & 1 deletion lib/Post_Type_Labels.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct( $post_type, $name_singular, $name_plural = '' ) {
*/
public function init() {
add_filter( "post_type_labels_{$this->post_type}", function() {
return $this->get_labels();
return (object) $this->get_labels();
} );

if ( is_admin() ) {
Expand Down

0 comments on commit 19cd00b

Please sign in to comment.