Skip to:

Opened 3 years ago

Closed 3 years ago

#8528 closed defect (bug) (fixed)

BP Nouveau: make sure the Primary Nav block is registered before unregistering it

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 9.0.0 Priority: normal
Severity: normal Version:
Component: Templates Keywords: has-patch


I believe we also need to make sure the Block unregister function is available

Attachments (1)

8528.patch (902 bytes) - added by imath 3 years ago.

Download all attachments as: .zip

Change History (2)

3 years ago

#1 @imath
3 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 13016:

Nouveau: only unregister the 'bp/primary-nav' block if it's registered

Nouveau unregisters this block when an admin edits a post type as it doesn't make sense to use this block into the Post Block Editor context. To prevent a _doing_it_wrong() from WordPress, it's probably safest to check if the block exists before unregistering it.

This commits also makes sure the user is using WP > 5.0.

Fixes #8528

Note: See TracTickets for help on using tickets.