Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#50321 closed enhancement (fixed)

REST API: Add plugin and block directory endpoints

Reported by: timothyblynjacobs's profile TimothyBlynJacobs Owned by: timothyblynjacobs's profile TimothyBlynJacobs
Milestone: 5.5 Priority: high
Severity: normal Version: 4.7
Component: REST API Keywords: has-patch has-unit-tests has-dev-note
Focuses: Cc:


Gutenberg is introducing REST API endpoints for installing blocks, and activating/deactivating plugins. This is a tracking ticket for handling the core merge of this feature.

Change History (14)

#1 @TimothyBlynJacobs
4 years ago

  • Owner set to TimothyBlynJacobs
  • Status changed from new to reviewing

This ticket was mentioned in Slack in #core-restapi by timothybjacobs. View the logs.

4 years ago

This ticket was mentioned in PR #359 on WordPress/wordpress-develop by TimothyBJacobs.

4 years ago

  • Keywords has-patch has-unit-tests added

Original Gutenberg PR:

This also introduces a change in plugins_api to not perform a trigger error if this is a json request since we don't want that to break the JSON output.

Trac ticket:

#4 @TimothyBlynJacobs
4 years ago

  • Type changed from defect (bug) to enhancement

TimothyBJacobs commented on PR #359:

4 years ago

We'll also need a PR to update Gutenberg to use the wp/v2 namespace.

ellatrix commented on PR #359:

4 years ago

@TimothyBJacobs Can we keep everything experimental? Or are these APIs fully ready?

TimothyBJacobs commented on PR #359:

4 years ago

Thoughts on shipping experimental endpoints in core are [mixed]( so I'm not really sure about shipping experimental endpoints in general.

For this endpoint in particular, I don't think it needs to be shipped as experimental.

ryelle commented on PR #359:

4 years ago

Created a PR for updating the namespaces in Gutenberg:

I tested out the endpoints, and once I got this PR done , I was able to test out using the block directory — it all worked as expected.

#9 @TimothyBlynJacobs
4 years ago

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

In 48242:

REST API: Introduce plugin management and block directory endpoints.

These endpoints facilitate the Block Directory Inserter feature in Gutenberg. Users can now install, activate, deactivate, and delete plugins over the REST API. The block directoryendpoint allows searching for available blocks from the block directory.

Props cklee, talldanwp, noisysocks, joen, soean, youknowriad, dufresnesteven, gziolo, dd32, tellyworth, ryelle, spacedmonkey, TimothyBlynJacobs.
Fixes #50321.

#10 @SergeyBiryukov
4 years ago

In 48333:

Tests: Correct hardcoded "3 months ago" assertion in tests/rest-api/rest-block-directory-controller.php.

Now that more than 3 months have passed since 2020-03-23, this was causing test failures.

Follow-up to [48242].

See #50321.

#12 @SergeyBiryukov
4 years ago

In 48626:

Docs: Correct @since version for WP_REST_Plugins_Controller::get_item_schema().

Follow-up to [48242].

See #50321.

#13 @SergeyBiryukov
4 years ago

In 48627:

REST API: Use a consistent name for the textdomain schema property between plugins, themes, and block directory controllers.

Follow-up to [48242].

See #50321, #50776.

#14 @SergeyBiryukov
4 years ago

In 48628:

REST API: Use a consistent description for the textdomain schema property between plugins and themes controllers.

Follow-up to [48242], [48627].

Props audrasjb.
Fixes #50776. See #50321.

Note: See TracTickets for help on using tickets.