Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#54393 closed task (blessed) (fixed)

Add navigation areas REST API endpoint from Gutenberg plugin

Reported by: noisysocks's profile noisysocks Owned by: noisysocks's profile noisysocks
Milestone: 5.9 Priority: normal
Severity: normal Version:
Component: REST API Keywords: has-patch has-unit-tests
Focuses: rest-api Cc:

Description

Need to copy WP_REST_Block_Navigation_Areas_Controller into Core in order for the Navigation block to work in WP 5.9.

https://github.com/WordPress/gutenberg/blob/trunk/lib/class-wp-rest-block-navigation-areas-controller.php

Change History (8)

#1 @spacedmonkey
3 years ago

  • Focuses rest-api added
  • Keywords has-patch needs-unit-tests added

Please ensure that unit tests are added before committing to core. Looking at the gutenberg repo, there is no test coverage at the moment. This is a little worrying as merge deadline is Tuesday the 9th.

CC @adamziel for visibility.

#2 @spacedmonkey
3 years ago

Batching should also be enabled with this new endpoint.

#3 @TimothyBlynJacobs
3 years ago

The namespace on this needs to be stabilized as well.

#4 @antonvlasenko
3 years ago

@spacedmonkey You've added a has-patch tag, but I cannot find the patch anywhere.
Did you mean this PR: https://github.com/WordPress/gutenberg/pull/36178 ?

This ticket was mentioned in PR #1862 on WordPress/wordpress-develop by anton-vlasenko.


3 years ago
#5

  • Keywords has-unit-tests added; needs-unit-tests removed

Please don't review this PR yet. It's WIP.

Trac ticket: https://core.trac.wordpress.org/ticket/54393

#6 @noisysocks
3 years ago

  • Owner set to noisysocks
  • Resolution set to fixed
  • Status changed from new to closed

In 52133:

REST API: Add /wp/v2/block-navigation-areas endpoint

Copies WP_REST_Block_Navigation_Areas_Controller from the Gutenberg plugin. This
provides the /wp/v2/block-navigation-areas endpoint used by the Navigation
block.

Props antonvlasenko, TimothyBlynJacobs.
Fixes #54393.

noisysocks commented on PR #1862:


3 years ago
#7

Thanks @anton-vlasenko and @TimothyBJacobs!

#8 @johnbillion
3 years ago

The registration of this endpoint was removed in #54506.

Note: See TracTickets for help on using tickets.