Make WordPress Core

Opened 3 years ago

Last modified 2 years ago

#54293 new enhancement

Expand functionality of themes REST API

Reported by: spacedmonkey's profile spacedmonkey Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7
Component: REST API Keywords: needs-patch needs-unit-tests
Focuses: rest-api Cc:

Description (last modified by spacedmonkey)

Current the REST API for themes is extremely limited. It only allows for listing themes and getting the current theme. However, there are lots theme related functions that are not possible to access via this api. This includes ( but it not limited to )

  • Installing new themes
  • Network activating theme ( multisite only )
  • Network deactivating theme ( multisite only )
  • Active ( switch to theme )
  • Deleting theme

Any themes api should allow the patterns / structure of the plugins REST API, in it's params and responses.

It is also worth noting, that have a multisite element, as themes can be network activated / deactivated.

Change History (2)

#1 @spacedmonkey
3 years ago

For some extra context, this ticket was created because of this make blog post.

If the plan is to move to a react / gutenberg component based UI for themes, then then core will need this functionality in the theme REST API.

#2 @spacedmonkey
2 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.