Skip to content

At a glance throws an error if a post type is registered and unregistered #285

@mikeybinns

Description

@mikeybinns

We're using register_extended_post_type in our parent theme, but in the child theme we're using for a project, we don't need one of the CPTs, so we use unregister_post_type( 'cpt' ); on the init hook to remove it.

This leads the get_post_type_object function in glance_items to return null, and then returns an error in the dashboard.

Image

If you add a null check for the $pto variable in glance_items in the PostTypeAdmin class, it would fix this issue.

Image

Extended CPTs version: 5.0.8
WP Version: 6.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions